New org improvements

This commit is contained in:
Rotimi Best
2023-09-27 11:26:04 +01:00
parent 73a1d88cd9
commit 0fe6e2ab87
4 changed files with 10 additions and 5 deletions
@@ -6,6 +6,7 @@
import { goto } from '$app/navigation';
import { newOrgModal } from '$lib/components/Org/store';
import type { CurrentOrg } from '$lib/utils/types/org';
import { setTheme } from '$lib/utils/functions/theme';
export let canAddOrg = true;
let open = false;
@@ -18,6 +19,7 @@
function onClick(org: CurrentOrg) {
localStorage.setItem('classroomio_org_sitename', org.siteName);
currentOrg.set(org);
setTheme(org.theme);
goto($currentOrgPath);
open = false;
}
@@ -47,7 +49,7 @@
{#each $orgs as org}
<OrgSelectorItem
size="sm"
active={$currentOrg.shortName === org.shortName}
active={$currentOrg.id === org.id}
avatar={org.avatar_url}
avatarText={org.shortName}
text={org.name}