import { appWithTranslation } from 'next-i18next'
import { createTheme, ThemeProvider } from '@mui/material/styles'
import { CssBaseline } from '@mui/material'

import 'reset-css'
import '../styles/global.scss'
import Layout from '../components/layout'

function App ({ Component, pageProps }) {
  const theme = createTheme({
    palette: {
      mode: 'light'
    }
  })

  return (
    <ThemeProvider theme={theme}>
      <CssBaseline />
      <Layout>
        <Component {...pageProps} />
      </Layout>
    </ThemeProvider>
  )
}

export default appWithTranslation(App)
