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
@@ -43,12 +43,6 @@ export const isOrgAdmin = derived(currentOrg, ($currentOrg) => {
return $currentOrg.roleId === ROLE.ADMIN;
});
export const isOrgStudent = derived(currentOrg, ($currentOrg) => {
if ($currentOrg.roleId === 0) return null;
return $currentOrg.roleId === ROLE.STUDENT;
});
const getActivePlan = (org: AccountOrg) => {
return org.plans.find((p) => p.isActive);
};