import type { AppProps } from 'next/app'
import App, { AppContext, AppProps } from "next/app";
type TProps = AppProps & {
example: string;
};
export function MyCustomApp({ Component, pageProps, example }: TProps) {
return (
<>
<p>example: {example}</p>
<Component {...pageProps} />
</>
);
}
MyCustomApp.getInitialProps = async (context: AppContext) => {
const ctx = await App.getInitialProps(context);
return { ...ctx, example: "foo" };
};
export default MyCustomApp;