Spaces:
Sleeping
Sleeping
Download resources/js/components/alert-error.tsx from wepee/CAPS04-FE-REFACTOR: direct link, hf CLI and curl.
- Browser
- Download file 717 Bytes
-
https://huggingface.co/spaces/wepee/CAPS04-FE-REFACTOR/resolve/main/resources/js/components/alert-error.tsx
- Command line
-
hf download hf://spaces/wepee/CAPS04-FE-REFACTOR/resources/js/components/alert-error.tsx
-
curl -L -o alert-error.tsx https://huggingface.co/spaces/wepee/CAPS04-FE-REFACTOR/resolve/main/resources/js/components/alert-error.tsx
717 Bytes
| import { AlertCircleIcon } from 'lucide-react'; | |
| import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; | |
| export default function AlertError({ | |
| errors, | |
| title, | |
| }: { | |
| errors: string[]; | |
| title?: string; | |
| }) { | |
| return ( | |
| <Alert variant="destructive"> | |
| <AlertCircleIcon /> | |
| <AlertTitle>{title || 'Something went wrong.'}</AlertTitle> | |
| <AlertDescription> | |
| <ul className="list-inside list-disc text-sm"> | |
| {Array.from(new Set(errors)).map((error, index) => ( | |
| <li key={index}>{error}</li> | |
| ))} | |
| </ul> | |
| </AlertDescription> | |
| </Alert> | |
| ); | |
| } | |