Skip to content

Commit 0a3304c

Browse files
committed
Improve error handling
1 parent b9ac742 commit 0a3304c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pages/home/HomePage.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PageTitle } from "@/components/PageTitle"
22
import { Skeleton } from "@/components/ui/skeleton"
33
import { identityDetail, mintInfo } from "@/generated/client/sdk.gen"
4-
import { useSuspenseQuery } from "@tanstack/react-query"
4+
import { useSuspenseQuery, useQuery } from "@tanstack/react-query"
55
import { Suspense } from "react"
66

77
function Loader() {
@@ -13,24 +13,26 @@ function Loader() {
1313
}
1414

1515
function PageBody() {
16-
const { data: identityData } = useSuspenseQuery({
16+
const { data: identityData } = useQuery({
1717
queryKey: ["identity-detail"],
1818
queryFn: async () => {
1919
const response = await identityDetail()
2020
return response.data ?? null
2121
},
2222
staleTime: Infinity,
2323
gcTime: Infinity,
24+
throwOnError: false,
2425
})
2526

26-
const { data: mintData } = useSuspenseQuery({
27+
const { data: mintData } = useQuery({
2728
queryKey: ["mint-info"],
2829
queryFn: async () => {
2930
const response = await mintInfo()
3031
return response.data ?? null
3132
},
3233
staleTime: Infinity,
3334
gcTime: Infinity,
35+
throwOnError: false,
3436
})
3537

3638
return (

0 commit comments

Comments
 (0)