Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / packages/design-system/components/custom/error-boundary-custom.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | packages/design-system/components/custom/error-boundary-custom.tsx |
| Original SHA-256 | d363001e40d7d03fb929e27dccdf24b418a6490288b3ee5221cb5a427b372784 |
| Git blob SHA | 002d339c64af87909895fbedcefcd58d7e92ee18 |
| Reading-copy SHA-256 | d363001e40d7d03fb929e27dccdf24b418a6490288b3ee5221cb5a427b372784 |
Recovered source transcript
Download complete source text ↓35 lines · 1.1 KB
import { RefreshCw } from 'lucide-react'
import type { ReactNode } from 'react'
import { Alert, AlertDescription, AlertTitle } from '../shadcn/alert'
import { Button } from '../shadcn/button'
import { ErrorBoundary } from './error-boundary'
type ErrorBoundaryCustomProps = {
children: ReactNode
}
export const ErrorBoundaryCustom = ({ children }: ErrorBoundaryCustomProps) => {
return (
<ErrorBoundary
fallback={
<div className="flex min-h-[400px] items-center justify-center p-4">
<Alert className="max-w-lg">
<AlertTitle>Something went wrong</AlertTitle>
<AlertDescription className="mt-2">
<p className="mb-4 text-muted-foreground">
We apologize for the inconvenience. Please try refreshing the page.
</p>
<Button onClick={() => window.location.reload()} variant="outline" className="gap-2">
<RefreshCw className="size-4" />
Refresh Page
</Button>
</AlertDescription>
</Alert>
</div>
}
>
{children}
</ErrorBoundary>
)
}