mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import React, { useEffect } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import Head from 'next/head';
|
|
|
|
import { ThemeProvider } from '@mui/material/styles';
|
|
|
|
import CssBaseline from '@mui/material/CssBaseline';
|
|
import theme from '../src/theme';
|
|
import '../styles/globals.css';
|
|
|
|
export default function MyApp(props) {
|
|
const { Component, pageProps } = props;
|
|
|
|
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 />
|
|
<Component {...pageProps} />
|
|
</ThemeProvider>
|
|
</React.Fragment>
|
|
);
|
|
}
|
|
|
|
MyApp.propTypes = {
|
|
Component: PropTypes.elementType.isRequired,
|
|
pageProps: PropTypes.object.isRequired,
|
|
};
|