2020-04-09 00:29:13 +03:00
|
|
|
import * as React from "react";
|
|
|
|
|
2020-11-08 05:32:17 +03:00
|
|
|
import { Global } from "@emotion/core";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
import App from "next/app";
|
2020-10-22 03:31:04 +03:00
|
|
|
import { injectGlobalStyles, injectCodeBlockStyles } from "~/common/styles/global";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
// NOTE(wwwjim):
|
|
|
|
// https://nextjs.org/docs/advanced-features/custom-app
|
|
|
|
function MyApp({ Component, pageProps }) {
|
|
|
|
return (
|
2020-11-04 20:55:48 +03:00
|
|
|
<React.Fragment>
|
2020-04-09 00:29:13 +03:00
|
|
|
<Global styles={injectGlobalStyles()} />
|
2020-07-16 06:44:58 +03:00
|
|
|
<Global styles={injectCodeBlockStyles()} />
|
2020-04-09 00:29:13 +03:00
|
|
|
<Component {...pageProps} />
|
2020-11-04 20:55:48 +03:00
|
|
|
</React.Fragment>
|
2020-04-09 00:29:13 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
MyApp.getInitialProps = async (appContext) => {
|
|
|
|
const appProps = await App.getInitialProps(appContext);
|
|
|
|
return { ...appProps };
|
|
|
|
};
|
|
|
|
|
|
|
|
export default MyApp;
|