import '../styles/globals.css';
import type { AppProps } from 'next/app';
import { useRouter } from 'next/router';
import { Fraunces } from 'next/font/google'
import Navbar from '../components/Navbar';
import Footer from '../components/Footer';
import classNames from 'classnames';

const font = Fraunces({ subsets: ['latin'] })

function MyApp({ Component, pageProps }: AppProps) {

  const router = useRouter();
  const noNavPath = "/dashboard/"

  return (
    <main className={classNames("bg-deepcove min-h-screen flex justify-center", font.className)}>
      <script src={`https://maps.googleapis.com/maps/api/js?key=${process.env.GOOGLE_PLACES_API_KEY}&libraries=places`} />
      <div className="w-full max-w-[1920px]">
        {!router.pathname.includes("/dashboard/") && <Navbar />}
        {/* <Navbar /> */}
        <Component {...pageProps} />
        {!router.pathname.includes("/dashboard/") && <Footer />}
      </div>
    </main>
  );
}

export default MyApp;