Skip to content

Commit 2a8921b

Browse files
committed
TS Layout composable
1 parent 5904acf commit 2a8921b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

resources/js/composables/useAppLayout.js renamed to resources/js/composables/useAppLayout.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ref, computed, onMounted, onUnmounted, watchEffect } from 'vue';
22
import { usePage, useForm } from '@inertiajs/vue3';
33
import { route } from 'ziggy-js';
44
import { LayoutGrid, House, Info, Github, Code, Settings, LogOut, BookOpen } from 'lucide-vue-next';
5+
import { ExtendedMenuItem } from '@/types';
56

67
export function useAppLayout() {
78
const page = usePage();
@@ -14,7 +15,7 @@ export function useAppLayout() {
1415
});
1516

1617
// Menu items
17-
const menuItems = computed(() => [
18+
const menuItems = computed<ExtendedMenuItem[]>(() => [
1819
{
1920
label: 'Home',
2021
lucideIcon: House,
@@ -55,7 +56,7 @@ export function useAppLayout() {
5556
const logout = () => {
5657
logoutForm.post(route('logout'));
5758
};
58-
const userMenuItems = [
59+
const userMenuItems: ExtendedMenuItem[] = [
5960
{
6061
label: 'Settings',
6162
route: route('profile.edit'),

0 commit comments

Comments
 (0)