mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-26 18:44:56 +03:00
29 lines
770 B
JavaScript
29 lines
770 B
JavaScript
import App from "next/app";
|
|
import ThemeProvider from "~/components/system/ThemeProvider";
|
|
|
|
import * as React from "react";
|
|
|
|
import { Global } from "@emotion/react";
|
|
import { injectGlobalStyles, injectCodeBlockStyles } from "~/common/styles/global";
|
|
|
|
// NOTE(wwwjim):
|
|
// https://nextjs.org/docs/advanced-features/custom-app
|
|
function MyApp({ Component, pageProps }) {
|
|
return (
|
|
<ThemeProvider>
|
|
<React.Fragment>
|
|
<Global styles={injectGlobalStyles()} />
|
|
<Global styles={injectCodeBlockStyles()} />
|
|
<Component {...pageProps} />
|
|
</React.Fragment>
|
|
</ThemeProvider>
|
|
);
|
|
}
|
|
|
|
MyApp.getInitialProps = async (appContext) => {
|
|
const appProps = await App.getInitialProps(appContext);
|
|
return { ...appProps };
|
|
};
|
|
|
|
export default MyApp;
|