admin/app/global-error.tsx
alisaza e1eaf5eff5 feat: initial ghabilee-admin backoffice app
Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js
app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
2026-09-05 13:12:59 +03:30

24 lines
542 B
TypeScript

'use client'
import { useEffect } from 'react'
import { RouteErrorView } from '@/components/feedback/RouteErrorView'
import { reportClientError } from '@/lib/observability/client'
export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
useEffect(() => {
reportClientError(error, 'global')
}, [error])
return (
<html lang="fa">
<body>
<RouteErrorView
digest={error.digest}
onRetry={reset}
/>
</body>
</html>
)
}