2021-02-18 10:30:25 +03:00
|
|
|
import App from "next/app";
|
|
|
|
import ThemeProvider from "~/components/system/ThemeProvider";
|
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
import * as React from "react";
|
|
|
|
|
2020-11-30 08:24:22 +03:00
|
|
|
import { Global } from "@emotion/react";
|
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 (
|
2021-02-17 21:37:34 +03:00
|
|
|
<ThemeProvider>
|
|
|
|
<React.Fragment>
|
|
|
|
<Global styles={injectGlobalStyles()} />
|
|
|
|
<Global styles={injectCodeBlockStyles()} />
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</React.Fragment>
|
|
|
|
</ThemeProvider>
|
2020-04-09 00:29:13 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
MyApp.getInitialProps = async (appContext) => {
|
|
|
|
const appProps = await App.getInitialProps(appContext);
|
|
|
|
return { ...appProps };
|
|
|
|
};
|
|
|
|
|
|
|
|
export default MyApp;
|