diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx index 63495ce5cd65684aac4ae9fe18f2b0bd550cf308..982d81420445be9c899857a5cd5904dc19974985 100644 --- a/apps/web/src/routes/__root.tsx +++ b/apps/web/src/routes/__root.tsx @@ -9,6 +9,7 @@ import { type ErrorComponentProps, useLocation, useNavigate, + useRouter, } from "@tanstack/react-router"; import { CheckIcon, CopyIcon } from "lucide-react"; import { useEffect, useEffectEvent, useMemo, useRef, useState } from "react"; @@ -353,7 +354,8 @@ function HostedStaticEnvironmentBootstrap() { return null; } -function RootRouteErrorView({ error, reset }: ErrorComponentProps) { +function RootRouteErrorView({ error }: ErrorComponentProps) { + const router = useRouter(); const message = errorMessage(error); // Router pathname rather than window.location: desktop uses hash history, where the window path is always "/". const pathname = useLocation({ select: (location) => location.pathname }); @@ -376,7 +378,7 @@ function RootRouteErrorView({ error, reset }: ErrorComponentProps) {
{message}