Refactor app state management: replace globalStore.isStudent with isOrgStudent across multiple components for improved clarity and consistency. Update related logic to utilize isSelfPacedLikeCourse for self-paced course checks.

This commit is contained in:
Rotimi Best
2026-04-12 18:07:33 +01:00
parent 31cc45a277
commit 8ea0ab0a76
16 changed files with 57 additions and 64 deletions
@@ -4,7 +4,7 @@
import { Skeleton } from '@cio/ui/base/skeleton';
import { profile } from '$lib/utils/store/user';
import { orgs } from '$lib/utils/store/org';
import { globalStore } from '$lib/utils/store/app';
import { isOrgStudent } from '$lib/utils/store/app';
import { isFreePlan } from '$lib/utils/store/org';
import OrgLogo from '$features/ui/sidebar/org-sidebar/org-logo.svelte';
@@ -41,7 +41,7 @@
<Sidebar.Content>
{#if isCourseReady}
<Navigation path={currentPath} {id} isStudent={$globalStore.isStudent} />
<Navigation path={currentPath} {id} isStudent={$isOrgStudent ?? undefined} />
{:else}
<Sidebar.Group class="pt-0!">
<div class="flex h-8 items-center gap-2 rounded-md px-2">