File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ import React , { useEffect , useState } from 'react' ;
2+ import Link from 'next/link' ;
3+ import { useTheme } from 'next-themes' ;
4+
5+ const Logo = ( ) => {
6+ const { resolvedTheme } = useTheme ( ) ;
7+ const [ imageSrc , setImageSrc ] = useState ( '/img/logos/logo-blue.svg' ) ;
8+
9+ useEffect ( ( ) => {
10+ const src =
11+ resolvedTheme === 'dark'
12+ ? '/img/logos/logo-white.svg'
13+ : '/img/logos/logo-blue.svg' ;
14+ setImageSrc ( src ) ;
15+ } , [ resolvedTheme ] ) ;
16+
17+ return (
18+ < Link href = '/' className = '' >
19+ < img
20+ src = { imageSrc }
21+ className = 'h-8 lg:h-12 top-12 absolute left-1/2 -translate-x-1/2'
22+ />
23+ </ Link >
24+ ) ;
25+ } ;
26+
27+ export default function PageNotFound ( ) {
28+ return (
29+ < div className = 'h-screen w-full flex flex-col gap-8 items-center justify-center font-semibold text-center' >
30+ < Logo />
31+ < h1 className = 'leading-header text-h1 hidden lg:block' >
32+ 404 - Page Not Found!
33+ </ h1 >
34+
35+ < h1 className = 'lg:hidden text-h1 drop-shadow-[0px_0px_30px_rgba(148,163,184,0.9)]' >
36+ 404
37+ </ h1 >
38+ < h1 className = 'lg:hidden text-h5mobile' > Page Not Found!</ h1 >
39+
40+ < div className = 'font-light text-sm lg:text-xl' >
41+ The page you were looking for doesn't exist.
42+ </ div >
43+ < Link
44+ href = '/'
45+ className = 'flex items-center justify-center rounded border-2 border-white dark:border-none hover:bg-blue-700 transition-all duration-300 ease-in-out text-white w-[194px] h-10 font-semibold bg-primary dark:shadow-2xl'
46+ >
47+ BACK TO HOME
48+ </ Link >
49+ </ div >
50+ ) ;
51+ }
You can’t perform that action at this time.
0 commit comments