File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 44// SPDX-License-Identifier: AGPL-3.0-only
55// Please see LICENSE in the repository root for full details.
66
7- import { queryOptions , useQuery } from "@tanstack/react-query" ;
7+ import { queryOptions , useSuspenseQuery } from "@tanstack/react-query" ;
88import cx from "classnames" ;
99import { Suspense } from "react" ;
1010import { graphql } from "../../gql" ;
@@ -28,7 +28,7 @@ export const query = queryOptions({
2828} ) ;
2929
3030const AsyncFooter : React . FC = ( ) => {
31- const result = useQuery ( query ) ;
31+ const result = useSuspenseQuery ( query ) ;
3232
3333 if ( result . error || result . isPending ) {
3434 // We probably prefer to render an empty footer in case of an error
Original file line number Diff line number Diff line change 55// Please see LICENSE in the repository root for full details.
66
77import { createRouter } from "@tanstack/react-router" ;
8+ import LoadingScreen from "./components/LoadingScreen" ;
89import config from "./config" ;
910import { queryClient } from "./graphql" ;
1011import { routeTree } from "./routeTree.gen" ;
@@ -13,6 +14,7 @@ import { routeTree } from "./routeTree.gen";
1314export const router = createRouter ( {
1415 routeTree,
1516 basepath : config . root ,
17+ defaultPendingComponent : LoadingScreen ,
1618 defaultPreload : "intent" ,
1719 context : { queryClient } ,
1820} ) ;
You can’t perform that action at this time.
0 commit comments