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 4
4
// SPDX-License-Identifier: AGPL-3.0-only
5
5
// Please see LICENSE in the repository root for full details.
6
6
7
- import { queryOptions , useQuery } from "@tanstack/react-query" ;
7
+ import { queryOptions , useSuspenseQuery } from "@tanstack/react-query" ;
8
8
import cx from "classnames" ;
9
9
import { Suspense } from "react" ;
10
10
import { graphql } from "../../gql" ;
@@ -28,7 +28,7 @@ export const query = queryOptions({
28
28
} ) ;
29
29
30
30
const AsyncFooter : React . FC = ( ) => {
31
- const result = useQuery ( query ) ;
31
+ const result = useSuspenseQuery ( query ) ;
32
32
33
33
if ( result . error || result . isPending ) {
34
34
// We probably prefer to render an empty footer in case of an error
Original file line number Diff line number Diff line change 5
5
// Please see LICENSE in the repository root for full details.
6
6
7
7
import { createRouter } from "@tanstack/react-router" ;
8
+ import LoadingScreen from "./components/LoadingScreen" ;
8
9
import config from "./config" ;
9
10
import { queryClient } from "./graphql" ;
10
11
import { routeTree } from "./routeTree.gen" ;
@@ -13,6 +14,7 @@ import { routeTree } from "./routeTree.gen";
13
14
export const router = createRouter ( {
14
15
routeTree,
15
16
basepath : config . root ,
17
+ defaultPendingComponent : LoadingScreen ,
16
18
defaultPreload : "intent" ,
17
19
context : { queryClient } ,
18
20
} ) ;
You can’t perform that action at this time.
0 commit comments