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 ( My Next.js with MUI App {/* Global AppBar */} LAMINAX
); } MyApp.propTypes = { Component: PropTypes.elementType.isRequired, pageProps: PropTypes.object.isRequired, };