slate/pages/_app.js

26 lines
655 B
JavaScript
Raw Normal View History

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