File
Blob: src/client/components/ui/page-error-state.tsx
| 1 | import { AlertCircle } from "lucide-react"; |
| 2 | import { Button } from "../ui/button"; |
| 3 | |
| 4 | interface PageErrorStateProps { |
| 5 | message?: string; |
| 6 | className?: string; |
| 7 | action?: { label: string; onClick: () => void }; |
| 8 | } |
| 9 | |
| 10 | export function PageErrorState({ message = "Page not found.", className, action }: PageErrorStateProps) { |
| 11 | return ( |
| 12 | <div className={["flex items-center justify-center", className].filter(Boolean).join(" ")}> |
| 13 | <div className="text-center"> |
| 14 | <AlertCircle className="mx-auto mb-3 h-8 w-8 text-red-400" /> |
| 15 | <p className="text-sm text-zinc-400">{message}</p> |
| 16 | {action && ( |
| 17 | <Button variant="secondary" size="sm" onClick={action.onClick} className="mt-4"> |
| 18 | {action.label} |
| 19 | </Button> |
| 20 | )} |
| 21 | </div> |
| 22 | </div> |
| 23 | ); |
| 24 | } |