Skip to content

Commit 2715932

Browse files
committed
feat(frontend): add layout
1 parent 3e93dcf commit 2715932

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

frontend/src/components/DashboardPage/NavStart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defineProps<{
1919
<SidebarGroupLabel v-if="title">{{ title }}</SidebarGroupLabel>
2020
<SidebarMenu>
2121
<SidebarMenuItem>
22-
<SidebarMenuButton as-child>
22+
<SidebarMenuButton as-child isActive>
2323
<a href="#">
2424
<component :is="Home02" />
2525
<span>Introduction</span>

frontend/src/layouts/Dashboard.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script setup lang="ts">
2+
import AppSidebar from '@/components/DashboardPage/AppSidebar.vue'
3+
import Header from '@/components/DashboardPage/Header.vue'
4+
import { SidebarProvider } from '@/components/ui/sidebar'
5+
</script>
6+
7+
<template>
8+
<div class="flex flex-col">
9+
<Header />
10+
<SidebarProvider class="mt-14">
11+
<AppSidebar />
12+
<div class="h-dvh w-dvw">
13+
<slot />
14+
</div>
15+
</SidebarProvider>
16+
</div>
17+
</template>
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
<script setup lang="ts">
22
import { useHead } from '@unhead/vue'
33
4-
import AppSidebar from '@/components/DashboardPage/AppSidebar.vue'
5-
import Header from '@/components/DashboardPage/Header.vue'
6-
import { SidebarProvider } from '@/components/ui/sidebar'
4+
import Dashboard from '@/layouts/Dashboard.vue'
75
86
useHead({
97
title: 'Dashboard',
108
})
119
</script>
1210

1311
<template>
14-
<div class="flex flex-col">
15-
<Header />
16-
<SidebarProvider class="mt-14">
17-
<AppSidebar />
18-
<div class="h-dvh w-dvw"></div>
19-
</SidebarProvider>
20-
</div>
12+
<Dashboard>
13+
<RouterView />
14+
</Dashboard>
2115
</template>

0 commit comments

Comments
 (0)