Portfolio website written with Next.js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
wychdev-nextjs/pages/_app.tsx

19 lines
515 B

import "../styles/globals.css"
import type { AppProps } from "next/app"
import type { ReactElement, ReactNode } from "react"
import type { NextPage } from "next"
export type NextPageWithLayout = NextPage & {
getLayout?: (page: ReactElement) => ReactNode
}
type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout
}
function MyApp({ Component, pageProps }: AppProps) {
const getLayout = Component.getLayout ?? ((page) => page)
return getLayout(<Component {...pageProps}/>)
}
export default MyApp