diff --git a/src/lib/components/breadcrumbs.svelte b/src/lib/components/breadcrumbs.svelte index c605df93b..23ef969f2 100644 --- a/src/lib/components/breadcrumbs.svelte +++ b/src/lib/components/breadcrumbs.svelte @@ -9,6 +9,10 @@ } from '@appwrite.io/pink-icons-svelte'; import { BottomSheet } from '$lib/components'; import { isSmallViewport } from '$lib/stores/viewport'; + import { isCloud } from '$lib/system'; + import { goto } from '$app/navigation'; + import { base } from '$app/paths'; + import { newOrgModal } from '$lib/stores/organization'; type Project = { name: string; @@ -63,6 +67,12 @@ let organisationBottomSheetOpen = false; let projectsBottomSheetOpen = false; + function createOrg() { + if (isCloud) { + goto(`${base}/create-organization`); + } else newOrgModal.set(true); + } + const switchOrganization = { top: { title: 'Switch Organization', @@ -76,7 +86,7 @@ { name: 'Create organization', leadingIcon: IconPlus, - href: `/console/create-organization` + onClick: createOrg } ] } @@ -109,7 +119,7 @@ { name: 'Create organization', leadingIcon: IconPlus, - href: `/console/create-organization` + onClick: createOrg } ] } @@ -224,10 +234,9 @@