This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { CssBaseline } from '@mui/material'
|
||||
import { createTheme, ThemeProvider } from '@mui/material/styles'
|
||||
import { appWithTranslation } from 'next-i18next'
|
||||
import withYM from 'next-ym'
|
||||
import Router from 'next/router'
|
||||
|
||||
import 'reset-css'
|
||||
import '../styles/global.scss'
|
||||
import Layout from '../components/layout'
|
||||
import WithYandexMetrika from '../components/WithYandexMetrika'
|
||||
|
||||
function App ({ Component, pageProps }) {
|
||||
const theme = createTheme({
|
||||
@@ -16,13 +15,15 @@ function App ({ Component, pageProps }) {
|
||||
})
|
||||
|
||||
return (
|
||||
<ThemeProvider theme={theme}>
|
||||
<CssBaseline />
|
||||
<Layout>
|
||||
<Component {...pageProps} />
|
||||
</Layout>
|
||||
</ThemeProvider>
|
||||
<WithYandexMetrika>
|
||||
<ThemeProvider theme={theme}>
|
||||
<CssBaseline />
|
||||
<Layout>
|
||||
<Component {...pageProps} />
|
||||
</Layout>
|
||||
</ThemeProvider>
|
||||
</WithYandexMetrika>
|
||||
)
|
||||
}
|
||||
|
||||
export default withYM(process.env.YA_METRIKA_ID, Router)(appWithTranslation(App))
|
||||
export default appWithTranslation(App)
|
||||
|
||||
Reference in New Issue
Block a user