Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/app/global-error.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/app/global-error.tsx |
| Original SHA-256 | e7b3dfe49f11c515d67bd2b1448191a00abc2128ea2e4734dc127783d0e92a38 |
| Git blob SHA | 8090c108c6e4e4fe30c338ca7d6dece6727e1749 |
| Reading-copy SHA-256 | e7b3dfe49f11c515d67bd2b1448191a00abc2128ea2e4734dc127783d0e92a38 |
Recovered source transcript
Download complete source text ↓31 lines · 0.9 KB
'use client'
import { captureException } from '@sentry/nextjs'
import { Button } from '@thedaviddias/design-system/button'
import { fonts } from '@thedaviddias/design-system/lib/fonts'
import type { ErrorInfo } from 'next/error'
import { useEffect } from 'react'
/**
* Global error boundary component that captures exceptions and provides a retry action
*
* @param props - Error properties containing the error and unstable_retry function
* @returns Error page with retry button
*/
const GlobalError = ({ error, unstable_retry }: ErrorInfo) => {
useEffect(() => {
captureException(error)
}, [error])
return (
<html lang="en" className={fonts}>
<body>
<h1 className="text-3xl font-bold text-center mt-8">Oops, something went wrong</h1>
<Button onClick={() => unstable_retry()}>Try again</Button>
</body>
</html>
)
}
export default GlobalError