diff --git a/src/lib/components/Org/Settings/index.svelte b/src/lib/components/Org/Settings/index.svelte index 62771d5e..fd34c9dd 100644 --- a/src/lib/components/Org/Settings/index.svelte +++ b/src/lib/components/Org/Settings/index.svelte @@ -8,6 +8,7 @@ import { onMount } from 'svelte'; import { browser } from '$app/environment'; import { goto } from '$app/navigation'; + import { isOrgAdmin } from '$lib/utils/store/org'; let selected = 0; let query = new URLSearchParams($page.url.search); @@ -18,19 +19,22 @@ key: 0, label: 'Profile', tabKey: '', - href: $page.url.pathname + href: $page.url.pathname, + disabled: false }, { key: 1, label: 'Organization', tabKey: 'org', - href: `${$page.url.pathname}?tab=org` + href: `${$page.url.pathname}?tab=org`, + disabled: !$isOrgAdmin }, { key: 2, label: 'LandingPage', tabKey: 'landingpage', - href: `${$page.url.pathname}?tab=landingpage` + href: `${$page.url.pathname}?tab=landingpage`, + disabled: !$isOrgAdmin } ]; @@ -59,7 +63,7 @@ {#each tabs as tab} - + {/each} diff --git a/src/lib/components/PrimaryButton/index.svelte b/src/lib/components/PrimaryButton/index.svelte index 17fb1ef0..ed0085fb 100644 --- a/src/lib/components/PrimaryButton/index.svelte +++ b/src/lib/components/PrimaryButton/index.svelte @@ -13,12 +13,12 @@ export let isDisabled = false; export let isLoading = false; - $: isDisabled = isLoading ? true : false; + $: isDisabled = isLoading ? true : isDisabled;