import 'styles/globals.css'
import type { AppProps } from 'next/app'
import MainLayout from 'layouts/mainLayout'
import PageLayout from 'layouts/pageLayout'
import { useRouter } from 'next/router'

function MyApp({ Component, pageProps }: AppProps) {
  const route = useRouter();
  return (

    route.pathname === "/" ?
      <MainLayout>
        <Component {...pageProps} />
      </MainLayout>
      :
      <PageLayout>
        <Component {...pageProps} />
      </PageLayout>

  )
}

export default MyApp
