22 lines
612 B
TypeScript
22 lines
612 B
TypeScript
import React from 'react'
|
|
import {
|
|
HydrationBoundary,
|
|
QueryClient,
|
|
QueryClientProvider,
|
|
} from '@tanstack/react-query'
|
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
|
import type { AppProps } from 'next/app'
|
|
|
|
export default function MyApp({ Component, pageProps }: AppProps) {
|
|
const [queryClient] = React.useState(() => new QueryClient())
|
|
|
|
return (
|
|
<QueryClientProvider client={queryClient}>
|
|
<HydrationBoundary state={pageProps.dehydratedState}>
|
|
<Component {...pageProps} />
|
|
</HydrationBoundary>
|
|
<ReactQueryDevtools />
|
|
</QueryClientProvider>
|
|
)
|
|
}
|