Skip to content

Commit

Permalink
feat(frontend): Scroll restoration
Browse files Browse the repository at this point in the history
  • Loading branch information
declanlscott committed Feb 8, 2024
1 parent d8d38fb commit 6863222
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/routes/root.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { lazy, Suspense } from "react";
import { QueryClient } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { createRootRouteWithContext } from "@tanstack/react-router";
import {
createRootRouteWithContext,
ScrollRestoration,
} from "@tanstack/react-router";

import { Layout } from "~/components/Layout";

Expand All @@ -24,6 +27,8 @@ export const rootRoute = rootRouteWithContext({
<>
<Layout />

<ScrollRestoration getKey={(location) => location.pathname} />

<Suspense>
<TanStackRouterDevtools position="bottom-right" />
</Suspense>
Expand Down

0 comments on commit 6863222

Please sign in to comment.