| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- function AApp({ Component, pageProps }) {
- return (
- <Layout>
- <Component {...pageProps} />
- </Layout>
- )
- }
- import * as React 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 { CacheProvider } from '@emotion/react';
- import theme from '../src/theme';
- import createEmotionCache from '../src/createEmotionCache';
- import Layout from '../components/Layout'
- // Client-side cache, shared for the whole session of the user in the browser.
- const clientSideEmotionCache = createEmotionCache();
- export default function MyApp(props) {
- const { Component, emotionCache = clientSideEmotionCache, pageProps } = props;
- return (
- <CacheProvider value={emotionCache}>
- <Head>
- <meta name="viewport" content="initial-scale=1, width=device-width" />
- </Head>
- <Layout>
- <ThemeProvider theme={theme}>
- {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
- <CssBaseline />
- <Component {...pageProps} />
- </ThemeProvider>
- </Layout>
- </CacheProvider>
- );
- }
- MyApp.propTypes = {
- Component: PropTypes.elementType.isRequired,
- emotionCache: PropTypes.object,
- pageProps: PropTypes.object.isRequired,
- };
|