11import { Home } from "lucide-react"
2- import SubmitButton from "@/components/buttons/submitButton "
2+ import { useEffect } from "react "
33import MessageComponent from "@/components/MessageComponent"
44import Navbar from "@/components/navbar"
55import GoHomeButton from "@/components/utils/GoHome"
6+ import ContactSupport from "@/components/ContactSupport"
7+ import posthog from "posthog-js"
8+
69export default function Custom404 ( ) {
10+ useEffect ( ( ) => {
11+ posthog . capture ( "404" , {
12+ name : "404" ,
13+ path : typeof window !== 'undefined' ? window . location . pathname : undefined ,
14+ } ) ;
15+ } , [ ] ) ;
16+
717 return (
8- < >
9- < main className = "styled-scroll" >
10- < div className = "min-h-screen overflow-hidden relative font-robo" >
11- < Navbar />
12- < div className = "mx-auto max-w-xl bg-secondary-700 md:shadow-card rounded-lg w-full overflow-hidden relative px-6 py-6 h-[500px] min-h-[550px]" >
13- < MessageComponent >
14- < MessageComponent . Content icon = "red" >
15- < div className = "text-center" >
16- < p className = "text-base font-semibold text-primary" > 404</ p >
17- < h1 className = "mt-2 text-4xl font-bold tracking-tight text-primary-text sm:text-5xl" > Page not found.</ h1 >
18- < p className = "mt-2 text-base text-secondary-text" > Sorry, we couldn't find the page you're looking for.</ p >
19- </ div >
20- </ MessageComponent . Content >
21- < MessageComponent . Buttons >
22- < GoHomeButton >
23- < SubmitButton buttonStyle = "outline" isDisabled = { false } isSubmitting = { false } icon = { < Home className = "h-5 w-5" /> } >
24- Go home
25- </ SubmitButton >
26- </ GoHomeButton >
27- </ MessageComponent . Buttons >
28- </ MessageComponent >
18+ < main className = "styled-scroll max-sm:bg-secondary-700" >
19+ < div className = "min-h-screen overflow-hidden relative font-robo" >
20+ < Navbar />
21+ < div className = "mx-auto w-full max-w-[480px]" >
22+ < div className = "bg-secondary-700 md:shadow-card rounded-3xl w-full overflow-hidden relative p-4 sm:h-[444px] max-sm:h-[90svh]" >
23+ < MessageComponent >
24+ < MessageComponent . Content icon = "red" center >
25+ < MessageComponent . Header >
26+ Page not found
27+ </ MessageComponent . Header >
28+ < MessageComponent . Description >
29+ < p className = "mx-auto text-center text-base font-normal leading-5 text-secondary-text px-9" >
30+ < span > We couldn't find a page with this link. If you believe there's an issue, please</ span >
31+ < ContactSupport >
32+ < button
33+ type = "button"
34+ className = "mx-1 underline decoration-gray-400 underline-offset-2 hover:decoration-gray-200 focus:outline-none"
35+ >
36+ contact our support
37+ </ button >
38+ </ ContactSupport >
39+ < span > and we'll help you fix it.</ span >
40+ </ p >
41+ </ MessageComponent . Description >
42+ </ MessageComponent . Content >
43+ < MessageComponent . Buttons >
44+ < GoHomeButton >
45+ < button
46+ type = "button"
47+ className = "w-full inline-flex items-center justify-center gap-2 rounded-xl bg-secondary-300 px-5 py-4 text-base font-semibold leading-6 text-primary-text hover:bg-secondary-400 focus:outline-none transition"
48+ >
49+ < Home className = "h-5 w-5" aria-hidden = "true" />
50+ < span > Back to app</ span >
51+ </ button >
52+ </ GoHomeButton >
53+ </ MessageComponent . Buttons >
54+ </ MessageComponent >
2955 </ div >
3056 </ div >
31- </ main >
32- </ >
57+ </ div >
58+ </ main >
3359 )
34- }
60+ }
0 commit comments