44 lines
1.2 KiB
JavaScript
Executable File
44 lines
1.2 KiB
JavaScript
Executable File
import * as React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import Head from 'next/head';
|
|
import { CssBaseline, AppBar, Toolbar, Typography, Button, ThemeProvider } from '@mui/material';
|
|
import darkTheme from '../src/theme';
|
|
export default function MyApp(props) {
|
|
const { Component, pageProps } = props;
|
|
|
|
React.useEffect(() => {
|
|
const jssStyles = document.querySelector('#jss-server-side');
|
|
if (jssStyles) {
|
|
jssStyles.parentElement.removeChild(jssStyles);
|
|
}
|
|
}, []);
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<Head>
|
|
<title>My Next.js with MUI App</title>
|
|
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
|
</Head>
|
|
<ThemeProvider theme={darkTheme}>
|
|
<CssBaseline />
|
|
|
|
{/* Global AppBar */}
|
|
<AppBar position="static">
|
|
<Toolbar>
|
|
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
|
|
LAMINAX
|
|
</Typography>
|
|
</Toolbar>
|
|
</AppBar>
|
|
<br />
|
|
<Component {...pageProps} />
|
|
</ThemeProvider>
|
|
</React.Fragment>
|
|
);
|
|
}
|
|
|
|
MyApp.propTypes = {
|
|
Component: PropTypes.elementType.isRequired,
|
|
pageProps: PropTypes.object.isRequired,
|
|
};
|