fix: breadcrumbs

This commit is contained in:
Arman committed 2022-08-24 13:45:18 +02:00
1 parent 01ba06f901
commit 1c65d46e38
2 files changed
+5 -19

No files matched your search

+5 -5
View File
@@ -4,7 +4,8 @@
import { sdkForConsole, setProject } from '$lib/stores/sdk';
import { collection } from './databases/database/[database]/collection/[collection]/store';
import { UploadBox } from '$lib/components';
import { organization, project } from './store';
import { project } from './store';
import { organization } from '../store';
import { onMount } from 'svelte';
import { afterNavigate } from '$app/navigation';
import { updateLayout } from '$lib/stores/layout';
@@ -47,7 +48,6 @@
afterNavigate(handle);
let loaded = false;
const path = 'console';
async function handle(event = null) {
if ($project?.$id !== projectId) {
setProject(projectId);
@@ -63,9 +63,9 @@
level: 1,
breadcrumbs: [
{
href: path,
title: $project.name,
level: 1
href: 'console',
title: $organization.name,
level: 0
},
{
href: $project.$id,
-14
View File
@@ -15,18 +15,4 @@ function createProject() {
};
}
function createOrganization() {
const { subscribe, set } = writable<Models.Team>();
return {
subscribe,
set,
load: async (teamId: string) => {
const team = await sdkForConsole.teams.get(teamId);
set(team);
}
};
}
export const project = createProject();
export const organization = createOrganization();