forked from advayc/futuremd-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewsletter.tsx
39 lines (32 loc) · 1.17 KB
/
newsletter.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React from "react";
import { Inter } from "next/font/google";
import Navbar from "@/components/navbar";
import { useRouter } from "next/router";
import { useEffect } from "react";
import Head from 'next/head';
import { Footer } from '@/components/footer';
import ComingSoon from '@/components/soon';
const inter = Inter({ subsets: ["latin"] });
export default function Events() {
const router = useRouter();
useEffect(() => {
const handleRouteChange = (url: string) => {
document.documentElement.classList.add('transition-colors', 'duration-700');
setTimeout(() => {
document.documentElement.classList.remove('transition-colors', 'duration-700');
}, 1700);
};
router.events.on('routeChangeStart', handleRouteChange);
return () => {
router.events.off('routeChangeStart', handleRouteChange);
};
}, [router.events]);
return (
<main className={`min-h-screen items-center justify-between pt-8 ${inter.className} dark:bg-dark-bg bg-light-bg transition-colors duration-700`}>
<Head><title>FutureMD - Newsletter</title></Head>
<Navbar showAnimation={false} />
<ComingSoon />
<Footer />
</main>
);
}