diff --git a/web-citizen-reporting/web-citizen-reporting-template/src/routes/__root.tsx b/web-citizen-reporting/web-citizen-reporting-template/src/routes/__root.tsx index 2c24cdff0..1e53cb0ee 100644 --- a/web-citizen-reporting/web-citizen-reporting-template/src/routes/__root.tsx +++ b/web-citizen-reporting/web-citizen-reporting-template/src/routes/__root.tsx @@ -1,24 +1,28 @@ import { Outlet, createRootRouteWithContext, + useLocation, useRouterState, } from "@tanstack/react-router"; import Footer from "@/components/Footer"; import { SiteHeader } from "@/components/SiteHeader"; -import type { QueryClient } from "@tanstack/react-query"; -import NotFound from "@/pages/NotFound"; import { Spinner } from "@/components/Spinner"; +import NotFound from "@/pages/NotFound"; +import type { QueryClient } from "@tanstack/react-query"; function RouterSpinner() { const isLoading = useRouterState({ select: (s) => s.status === "pending" }); return ; } -export const Route = createRootRouteWithContext<{ - queryClient: QueryClient; -}>()({ - component: () => ( +function RootComponent() { + const pathname = useLocation({ + select: (location) => location.pathname, + }); + const isFooterHidden = pathname === "/thank-you"; + + return ( <>
@@ -29,10 +33,16 @@ export const Route = createRootRouteWithContext<{
-