feat: add icon to create a new lesson from side nav (#145)

* feat: classroomio-issue-143

* issue 143: remove bg-color from the add icon

* fix: hide the + icon for student

---------

Co-authored-by: Rotimi Best <best@classroomio.com>
This commit is contained in:
Adeyemi Adetunji
2024-02-01 20:18:03 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 67db904dae
commit cadfa81913
28 changed files with 123 additions and 100 deletions
@@ -7,8 +7,8 @@
import Confetti from '../Confetti/index.svelte';
import { isMobile } from '$lib/utils/store/useMobile';
import { profile } from '$lib/utils/store/user';
import { apps } from '$lib/components/Apps/store';
import { fetchCourse } from '$lib/utils/services/courses';
import { globalStore } from '$lib/utils/store/app';
export let courseId = '';
export let path = '';
@@ -44,15 +44,17 @@
$: onCourseIdChange(courseId);
$: {
$: if (typeof $globalStore.isStudent !== 'boolean') {
const user = $group.people.find((person) => person.profile_id === $profile.id);
if (user) {
isStudent = user.role_id === 3;
$apps.isStudent = isStudent;
$globalStore.isStudent = isStudent;
filterPollsByStatus(isStudent);
}
} else {
isStudent = $globalStore.isStudent;
}
</script>