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
@@ -6,7 +6,7 @@
import { setTheme } from '$lib/utils/functions/theme';
import { setupCloudAnalytics } from '$lib/utils/functions/appSetup';
import { globalStore } from '$lib/utils/store/app';
import { currentOrg, isOrgStudent } from '$lib/utils/store/org';
import { currentOrg } from '$lib/utils/store/org';
import { appInitApi } from '$features/app/init.svelte';
import { onMount } from 'svelte';
import { authClient } from '$lib/utils/services/auth/client';
@@ -98,13 +98,6 @@
}
});
$effect(() => {
if ($isOrgStudent === null) return;
if ($isOrgStudent !== $globalStore.isStudent) {
globalStore.update((s) => ({ ...s, isStudent: !!$isOrgStudent }));
}
});
</script>
<UpgradeModal />