Skip to content

Commit 7b0b860

Browse files
committed
refactor: use route helper instead of using static routes
1 parent c22e63e commit 7b0b860

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

resources/js/components/AppHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const activeItemStyles = computed(() => (url: string) => (isCurrentRoute(url) ?
4141
const mainNavItems: NavItem[] = [
4242
{
4343
title: 'Dashboard',
44-
href: '/dashboard',
44+
href: route('dashboard'),
4545
icon: LayoutGrid,
4646
},
4747
];

resources/js/components/AppSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import AppLogo from './AppLogo.vue';
1111
const mainNavItems: NavItem[] = [
1212
{
1313
title: 'Dashboard',
14-
href: '/dashboard',
14+
href: route('dashboard'),
1515
icon: LayoutGrid,
1616
},
1717
];

resources/js/layouts/settings/Layout.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import { Link } from '@inertiajs/vue3';
88
const sidebarNavItems: NavItem[] = [
99
{
1010
title: 'Profile',
11-
href: '/settings/profile',
11+
href: route('profile.edit'),
1212
},
1313
{
1414
title: 'Password',
15-
href: '/settings/password',
15+
href: route('password.edit'),
1616
},
1717
{
1818
title: 'Appearance',
19-
href: '/settings/appearance',
19+
href: route('appearance'),
2020
},
2121
];
2222

resources/js/pages/Dashboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import PlaceholderPattern from '../components/PlaceholderPattern.vue';
77
const breadcrumbs: BreadcrumbItem[] = [
88
{
99
title: 'Dashboard',
10-
href: '/dashboard',
10+
href: route('dashboard'),
1111
},
1212
];
1313

0 commit comments

Comments
 (0)