Switch to the new scroll restoration API & update snapshots

This commit is contained in:
Quentin Gliech
2025-01-31 18:24:30 +01:00
parent 0f6b69eb01
commit 47a4db520d
4 changed files with 22 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ import { routeTree } from "./routeTree.gen";
// Create a new router instance
export const router = createRouter({
routeTree,
scrollRestoration: true,
basepath: config.root,
defaultPendingComponent: LoadingScreen,
defaultPreload: "intent",

View File

@@ -9,7 +9,6 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import {
type ErrorRouteComponent,
Outlet,
ScrollRestoration,
createRootRouteWithContext,
} from "@tanstack/react-router";
import { TanStackRouterDevtools } from "@tanstack/router-devtools";
@@ -28,7 +27,6 @@ export const Route = createRootRouteWithContext<{
}>()({
component: () => (
<>
<ScrollRestoration />
<Outlet />
{import.meta.env.DEV &&

View File

@@ -48,6 +48,9 @@ exports[`Reset cross signing > renders the cancelled page 1`] = `
</p>
</div>
</div>
<script>
</script>
</DocumentFragment>
`;
@@ -234,6 +237,9 @@ exports[`Reset cross signing > renders the deep link page 1`] = `
</p>
</footer>
</div>
<script>
</script>
</DocumentFragment>
`;
@@ -322,6 +328,9 @@ exports[`Reset cross signing > renders the errored page 1`] = `
</p>
</footer>
</div>
<script>
</script>
</DocumentFragment>
`;
@@ -508,6 +517,9 @@ exports[`Reset cross signing > renders the page 1`] = `
</p>
</footer>
</div>
<script>
</script>
</DocumentFragment>
`;
@@ -554,6 +566,9 @@ exports[`Reset cross signing > renders the success page 1`] = `
</p>
</div>
</div>
<script>
</script>
</DocumentFragment>
`;
@@ -600,5 +615,8 @@ exports[`Reset cross signing > renders the success page 2`] = `
</p>
</div>
</div>
<script>
</script>
</DocumentFragment>
`;

View File

@@ -736,5 +736,8 @@ exports[`Account home page > renders the page 1`] = `
</p>
</footer>
</div>
<script>
</script>
</DocumentFragment>
`;