Skip to content

Commit 80ffe0c

Browse files
committed
missed links
1 parent 785571a commit 80ffe0c

File tree

7 files changed

+21
-12
lines changed

7 files changed

+21
-12
lines changed

resources/js/components/app-header.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/comp
99
import { UserMenuContent } from '@/components/user-menu-content';
1010
import { useInitials } from '@/hooks/use-initials';
1111
import { cn } from '@/lib/utils';
12+
import { dashboard } from '@/routes';
1213
import { type BreadcrumbItem, type NavItem, type SharedData } from '@/types';
1314
import { Link, usePage } from '@inertiajs/react';
1415
import { BookOpen, Folder, LayoutGrid, Menu, Search } from 'lucide-react';
@@ -18,7 +19,7 @@ import AppLogoIcon from './app-logo-icon';
1819
const mainNavItems: NavItem[] = [
1920
{
2021
title: 'Dashboard',
21-
href: '/dashboard',
22+
href: dashboard().url,
2223
icon: LayoutGrid,
2324
},
2425
];
@@ -94,7 +95,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
9495
</Sheet>
9596
</div>
9697

97-
<Link href="/dashboard" prefetch className="flex items-center space-x-2">
98+
<Link href={dashboard()} prefetch className="flex items-center space-x-2">
9899
<AppLogo />
99100
</Link>
100101

resources/js/components/app-sidebar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NavFooter } from '@/components/nav-footer';
22
import { NavMain } from '@/components/nav-main';
33
import { NavUser } from '@/components/nav-user';
44
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar';
5+
import { dashboard } from '@/routes';
56
import { type NavItem } from '@/types';
67
import { Link } from '@inertiajs/react';
78
import { BookOpen, Folder, LayoutGrid } from 'lucide-react';
@@ -10,7 +11,7 @@ import AppLogo from './app-logo';
1011
const mainNavItems: NavItem[] = [
1112
{
1213
title: 'Dashboard',
13-
href: '/dashboard',
14+
href: dashboard().url,
1415
icon: LayoutGrid,
1516
},
1617
];
@@ -35,7 +36,7 @@ export function AppSidebar() {
3536
<SidebarMenu>
3637
<SidebarMenuItem>
3738
<SidebarMenuButton size="lg" asChild>
38-
<Link href="/dashboard" prefetch>
39+
<Link href={dashboard()} prefetch>
3940
<AppLogo />
4041
</Link>
4142
</SidebarMenuButton>

resources/js/layouts/settings/layout.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,27 @@ import Heading from '@/components/heading';
22
import { Button } from '@/components/ui/button';
33
import { Separator } from '@/components/ui/separator';
44
import { cn } from '@/lib/utils';
5+
import { appearance } from '@/routes';
6+
import { edit as editPassword } from '@/routes/password';
7+
import { edit } from '@/routes/profile';
58
import { type NavItem } from '@/types';
69
import { Link } from '@inertiajs/react';
710
import { type PropsWithChildren } from 'react';
811

912
const sidebarNavItems: NavItem[] = [
1013
{
1114
title: 'Profile',
12-
href: '/settings/profile',
15+
href: edit().url,
1316
icon: null,
1417
},
1518
{
1619
title: 'Password',
17-
href: '/settings/password',
20+
href: editPassword().url,
1821
icon: null,
1922
},
2023
{
2124
title: 'Appearance',
22-
href: '/settings/appearance',
25+
href: appearance().url,
2326
icon: null,
2427
},
2528
];

resources/js/pages/dashboard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
import { PlaceholderPattern } from '@/components/ui/placeholder-pattern';
22
import AppLayout from '@/layouts/app-layout';
3+
import { dashboard } from '@/routes';
34
import { type BreadcrumbItem } from '@/types';
45
import { Head } from '@inertiajs/react';
56

67
const breadcrumbs: BreadcrumbItem[] = [
78
{
89
title: 'Dashboard',
9-
href: '/dashboard',
10+
href: dashboard().url,
1011
},
1112
];
1213

1314
export default function Dashboard() {
1415
return (
1516
<AppLayout breadcrumbs={breadcrumbs}>
1617
<Head title="Dashboard" />
17-
<div className="flex h-full flex-1 flex-col gap-4 rounded-xl p-4 overflow-x-auto">
18+
<div className="flex h-full flex-1 flex-col gap-4 overflow-x-auto rounded-xl p-4">
1819
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
1920
<div className="relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border">
2021
<PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" />

resources/js/pages/settings/appearance.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import { type BreadcrumbItem } from '@/types';
66

77
import AppLayout from '@/layouts/app-layout';
88
import SettingsLayout from '@/layouts/settings/layout';
9+
import { appearance } from '@/routes';
910

1011
const breadcrumbs: BreadcrumbItem[] = [
1112
{
1213
title: 'Appearance settings',
13-
href: '/settings/appearance',
14+
href: appearance().url,
1415
},
1516
];
1617

resources/js/pages/settings/password.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ import HeadingSmall from '@/components/heading-small';
1111
import { Button } from '@/components/ui/button';
1212
import { Input } from '@/components/ui/input';
1313
import { Label } from '@/components/ui/label';
14+
import { edit } from '@/routes/password';
1415

1516
const breadcrumbs: BreadcrumbItem[] = [
1617
{
1718
title: 'Password settings',
18-
href: '/settings/password',
19+
href: edit().url,
1920
},
2021
];
2122

resources/js/pages/settings/profile.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ import { Input } from '@/components/ui/input';
1212
import { Label } from '@/components/ui/label';
1313
import AppLayout from '@/layouts/app-layout';
1414
import SettingsLayout from '@/layouts/settings/layout';
15+
import { edit } from '@/routes/profile';
1516

1617
const breadcrumbs: BreadcrumbItem[] = [
1718
{
1819
title: 'Profile settings',
19-
href: '/settings/profile',
20+
href: edit().url,
2021
},
2122
];
2223

0 commit comments

Comments
 (0)