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.
|
|
|
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 }: AppPropsWithLayout) {
|
|
|
|
const getLayout = Component.getLayout ?? ((page) => page)
|
|
|
|
return getLayout(<Component {...pageProps}/>)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MyApp
|