import React from 'react' ; import CssBaseline from '@material-ui/core/CssBaseline' ; import { AppProps } from 'next/app' ; import { ThemeProvider } from '@material-ui/core/styles' ; import { theme } from '../styles/theme/default' ; export default function Emulator ( props ) { const { Component , pageProps } = props ; React . useEffect ( ( ) => { const jssStyles = document . querySelector ( '#jss-server-side' ) ; if ( jssStyles ) jssStyles . parentElement ! . removeChild ( jssStyles ) ; } , [ ] ) ; return ( < React . Fragment > < ThemeProvider theme = { theme } > < CssBaseline /> < Component { ... pageProps } /> < /ThemeProvider> < /React.Fragment>); }