2021-01-24 06:32:52 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Head from 'next/head';
|
2021-01-24 10:12:26 +00:00
|
|
|
|
2021-02-01 09:13:27 +00:00
|
|
|
import {ThemeProvider} from '@material-ui/core/styles';
|
2021-01-24 06:32:52 +00:00
|
|
|
|
2021-01-24 10:12:26 +00:00
|
|
|
import CssBaseline from '@material-ui/core/CssBaseline';
|
2021-01-24 06:32:52 +00:00
|
|
|
import theme from '../src/theme';
|
2021-01-24 06:07:44 +00:00
|
|
|
import '../styles/globals.css'
|
|
|
|
|
2021-01-24 06:32:52 +00:00
|
|
|
export default function MyApp(props) {
|
2021-01-24 10:12:26 +00:00
|
|
|
const {Component, pageProps} = props;
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
// Remove the server-side injected CSS.
|
|
|
|
const jssStyles = document.querySelector('#jss-server-side');
|
|
|
|
if (jssStyles) {
|
|
|
|
jssStyles.parentElement.removeChild(jssStyles);
|
|
|
|
}
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<React.Fragment>
|
|
|
|
<Head>
|
|
|
|
<title>BBGO</title>
|
|
|
|
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width"/>
|
|
|
|
</Head>
|
|
|
|
<ThemeProvider theme={theme}>
|
|
|
|
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
|
|
|
|
<CssBaseline/>
|
|
|
|
|
2021-02-01 09:13:27 +00:00
|
|
|
<Component {...pageProps}/>
|
2021-01-24 10:12:26 +00:00
|
|
|
</ThemeProvider>
|
|
|
|
</React.Fragment>
|
|
|
|
);
|
2021-01-24 06:07:44 +00:00
|
|
|
}
|
|
|
|
|
2021-01-24 06:32:52 +00:00
|
|
|
MyApp.propTypes = {
|
2021-01-24 10:12:26 +00:00
|
|
|
Component: PropTypes.elementType.isRequired,
|
|
|
|
pageProps: PropTypes.object.isRequired,
|
2021-01-24 06:32:52 +00:00
|
|
|
};
|