diff --git a/app/hooks/useMatch.ts b/app/hooks/useMatch.ts index 3709fcb..edd31e3 100644 --- a/app/hooks/useMatch.ts +++ b/app/hooks/useMatch.ts @@ -5,10 +5,10 @@ export function useMatch() { const { handle, ...rest } = matches[matches.length - 1]; if (handle == null) { - throw new Error("Bruh"); + throw new Error(`handle is missing for ${rest.pathname}`); } - return { handle, ...rest } as unknown as { + return { handle, ...rest } as unknown as typeof rest & { handle: { to: string; text: string }; }; }