Spaces:
Sleeping
Sleeping
Download befree-frontend/components/shared/ErrorState.tsx from Coeinterns/bank-statement-api: direct link, hf CLI and curl.
- Browser
- Download file 971 Bytes
-
https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/befree-frontend/components/shared/ErrorState.tsx
- Command line
-
hf download hf://spaces/Coeinterns/bank-statement-api/befree-frontend/components/shared/ErrorState.tsx
-
curl -L -o ErrorState.tsx https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/befree-frontend/components/shared/ErrorState.tsx
971 Bytes
| import { AlertCircle } from 'lucide-react'; | |
| import { Button } from '@/components/ui/button'; | |
| interface ErrorStateProps { | |
| title?: string; | |
| message?: string; | |
| onRetry?: () => void; | |
| } | |
| export function ErrorState({ | |
| title = 'Something went wrong', | |
| message = 'An error occurred. Please try again.', | |
| onRetry | |
| }: ErrorStateProps) { | |
| return ( | |
| <div className="flex items-center justify-center py-12"> | |
| <div className="text-center max-w-sm px-4"> | |
| <div className="w-12 h-12 rounded-full bg-error/10 flex items-center justify-center mx-auto mb-4"> | |
| <AlertCircle className="w-6 h-6 text-error" /> | |
| </div> | |
| <h3 className="font-semibold text-navy mb-2">{title}</h3> | |
| <p className="text-sm text-gray-600 mb-4">{message}</p> | |
| {onRetry && ( | |
| <Button variant="outline" onClick={onRetry} size="sm"> | |
| Try Again | |
| </Button> | |
| )} | |
| </div> | |
| </div> | |
| ); | |
| } | |