- The Story
- Cultural Heritage
- The Park
- Function
- The Events
- FAQ
- Newsroom
- Promo
import 'tailwindcss/tailwind.css'
import MobileMenu from 'components/Navbar/MobileMenu'
import { AppProps } from 'next/app'
import { Inter, Playfair_Display } from 'next/font/google'
import Link from 'next/link'
import { useRouter } from 'next/router'
import React from 'react'
import { useEffect } from 'react'
import { useState } from 'react'
import { Fade, Slide } from 'react-awesome-reveal'
import * as ga from '../lib/ga'
// fonts
const inter = Inter({
subsets: ['latin'],
variable: '--font-sans',
})
const playfair = Playfair_Display({
subsets: ['latin'],
variable: '--font-serif',
})
export default function App({ Component, pageProps }: AppProps) {
const router = useRouter()
useEffect(() => {
const handleRouteChange = (url) => {
ga.pageview(url)
}
//When the component is mounted, subscribe to router changes
//and log those page views
router.events.on('routeChangeComplete', handleRouteChange)
// If the component is unmounted, unsubscribe
// from the event with the `off` method
return () => {
router.events.off('routeChangeComplete', handleRouteChange)
}
}, [router.events])
const [isOpen, setOpen] = useState(false)
if (isOpen) {
return (