mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-26 13:45:30 +03:00
50ecf4496e
adding intercom back into the app, dropdown menu and search modal
35 lines
1015 B
JavaScript
35 lines
1015 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";
|
|
import { IntercomProvider } from 'react-use-intercom';
|
|
|
|
const INTERCOM_APP_ID = 'jwgbampk';
|
|
|
|
// NOTE(wwwjim):
|
|
// https://nextjs.org/docs/advanced-features/custom-app
|
|
function MyApp({ Component, pageProps }) {
|
|
return (
|
|
<ThemeProvider>
|
|
<React.Fragment>
|
|
<script src="//cdn.iframe.ly/embed.js" async></script>
|
|
<Global styles={injectGlobalStyles()} />
|
|
<Global styles={injectCodeBlockStyles()} />
|
|
<IntercomProvider appId={INTERCOM_APP_ID} autoBoot>
|
|
<Component {...pageProps} />
|
|
</IntercomProvider>
|
|
</React.Fragment>
|
|
</ThemeProvider>
|
|
);
|
|
}
|
|
|
|
MyApp.getInitialProps = async (appContext) => {
|
|
const appProps = await App.getInitialProps(appContext);
|
|
return { ...appProps };
|
|
};
|
|
|
|
export default MyApp;
|