github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/pages/not-found/index.jsx (about) 1 import s from './style.module.css' 2 import Link from 'next/link' 3 import { useEffect } from 'react' 4 5 export default function NotFound() { 6 useEffect(() => { 7 if ( 8 typeof window !== 'undefined' && 9 typeof window?.analytics?.track === 'function' && 10 typeof window?.document?.referrer === 'string' && 11 typeof window?.location?.href === 'string' 12 ) 13 window.analytics.track(window.location.href, { 14 category: '404 Response', 15 label: window.document.referrer || 'No Referrer', 16 }) 17 }, []) 18 19 return ( 20 <div className={s.root}> 21 <h1>Page Not Found</h1> 22 <p> 23 We're sorry but we can't find the page you're looking 24 for. 25 </p> 26 <p> 27 <Link href="/"> 28 <a>Back to Home</a> 29 </Link> 30 </p> 31 </div> 32 ) 33 }