Skip to content

Commit b965723

Browse files
committed
chore: Specify route context type
1 parent 26229db commit b965723

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Breadcrumbs.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { Cluster, Instance, Organization } from '@/lib/api.patch';
12
import { capitalizeWords } from '@/lib/string/capitalizeWords';
23
import { Link, useLocation, useRouteContext } from '@tanstack/react-router';
34
import { HomeIcon } from 'lucide-react';
45
import { useMemo } from 'react';
56

67
export function Breadcrumbs() {
78
const location = useLocation();
8-
const { organization, instance, cluster } = useRouteContext({ strict: false });
9+
const { organization, instance, cluster }: { organization?: Organization; instance?: Instance; cluster?: Cluster } = useRouteContext({ strict: false });
910
const breadcrumbs = useMemo(() => {
1011
const routeHistory = location.pathname.split('/')
1112
.filter((x) => x && x.length > 0);

0 commit comments

Comments
 (0)