Skip to content

Commit

Permalink
wip: adds custom _app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
alexUXUI committed Oct 16, 2021
1 parent 7653c54 commit 7778206
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import App, { AppContext, AppInitialProps, AppProps } from "next/app";

import "../styles/globals.css";
import type { AppProps } from "next/app";

function MyApp({ Component, pageProps }: AppProps) {
export default function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}
export default MyApp;

MyApp.getInitialProps = async (appContext: AppContext) => {
const data: AppInitialProps = await App.getInitialProps(appContext);

const pageProps = {
...data.pageProps,
};

return pageProps;
};

0 comments on commit 7778206

Please sign in to comment.