Fix ya metrika hopefully

This commit is contained in:
2022-07-05 11:58:01 +03:00
parent a77fefc251
commit d3cb737972
6 changed files with 2948 additions and 22363 deletions

View File

@@ -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)