Default view

This commit is contained in:
Brieuc Dubois 2024-01-11 23:38:19 +01:00
parent 691c02366e
commit 3a2b75263f
1 changed files with 9 additions and 2 deletions

View File

@ -1,11 +1,14 @@
<script lang="ts">
import { page } from '$app/stores';
import projectsApi from '$lib/api/projectsApi';
import ProjectComponent from '$lib/components/project/Project.svelte';
import Sidebar from '$lib/components/project/Sidebar.svelte';
import currentView from '$lib/stores/currentView';
import type Project from '$lib/types/Project';
import { views } from '$lib/types/View';
import { SvelteToast } from '@zerodevx/svelte-toast';
import { onMount } from 'svelte';
import ProjectComponent from '$lib/components/project/Project.svelte';
import { page } from '$app/stores';
import { get } from 'svelte/store';
let project: Project;
@ -20,6 +23,10 @@
await projectsApi.getTags(project);
await projectsApi.getViews(project);
await projectsApi.getCards(project);
if (get(views).length > 0) {
currentView.set(get(views)[0]);
}
});
</script>