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 <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
67db904dae
commit
cadfa81913
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user