fix: _app type issues
This commit is contained in:
parent
6b723656e7
commit
264fbc43fa
|
|
@ -19,6 +19,7 @@ import { APP_NAME, IPFS_GATEWAY } from "~/lib/env"
|
|||
import { toGateway } from "~/lib/ipfs-parser"
|
||||
import { createIDBPersister } from "~/lib/persister.client"
|
||||
import { urlComposer } from "~/lib/url-composer"
|
||||
import { AppPropsWithLayout } from "types/next"
|
||||
|
||||
Network.setIpfsGateway(IPFS_GATEWAY)
|
||||
|
||||
|
|
@ -34,8 +35,8 @@ const queryClient = new QueryClient({
|
|||
|
||||
const persister = createIDBPersister()
|
||||
|
||||
function MyApp({ Component, pageProps }: any) {
|
||||
const getLayout = Component.getLayout ?? ((page: any) => page)
|
||||
function MyApp({ Component, pageProps }: AppPropsWithLayout) {
|
||||
const getLayout = Component.getLayout ?? ((page) => page)
|
||||
|
||||
return (
|
||||
<WagmiConfig client={wagmiClient}>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
import { DehydratedState } from "@tanstack/react-query"
|
||||
import { NextPage } from "next"
|
||||
import { AppProps } from "next/app"
|
||||
import { ReactElement, ReactNode } from "react"
|
||||
|
||||
export type AppPropsWithLayout = AppProps<{
|
||||
dehydratedState: DehydratedState
|
||||
}> & {
|
||||
Component: NextPageWithLayout
|
||||
}
|
||||
|
||||
export type NextPageWithLayout<
|
||||
P = { dehydratedState: DehydratedState },
|
||||
IP = P,
|
||||
> = NextPage<P, IP> & {
|
||||
getLayout?: (page: ReactElement) => ReactNode
|
||||
}
|
||||
Loading…
Reference in New Issue