'use client'; import { useEffect } from 'react'; import Link from 'next/link'; import { ArrowLeft, MessageCircle } from 'lucide-react'; import { useCaptureException } from '@kit/monitoring/hooks'; import { Button } from '@kit/ui/button'; import { Heading } from '@kit/ui/heading'; import { Trans } from '@kit/ui/trans'; import { SiteHeader } from '~/(marketing)/_components/site-header'; const ErrorPage = ({ error, reset, }: { error: Error & { digest?: string }; reset: () => void; }) => { useCaptureException(error); // Ignore next.js internal transient navigation errors that occur during auth state changes const isTransientNavigationError = error?.message?.includes('Error in input stream') || error?.message?.includes('AbortError') || (error?.name === 'ChunkLoadError'); useEffect(() => { if (isTransientNavigationError && typeof window !== 'undefined') { window.location.href = '/'; } }, [isTransientNavigationError]); if (isTransientNavigationError) { return
; } return (