AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

alert-error.tsx 717B

123456789101112131415161718192021222324
  1. import { AlertCircleIcon } from 'lucide-react';
  2. import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
  3. export default function AlertError({
  4. errors,
  5. title,
  6. }: {
  7. errors: string[];
  8. title?: string;
  9. }) {
  10. return (
  11. <Alert variant="destructive">
  12. <AlertCircleIcon />
  13. <AlertTitle>{title || 'Something went wrong.'}</AlertTitle>
  14. <AlertDescription>
  15. <ul className="list-inside list-disc text-sm">
  16. {Array.from(new Set(errors)).map((error, index) => (
  17. <li key={index}>{error}</li>
  18. ))}
  19. </ul>
  20. </AlertDescription>
  21. </Alert>
  22. );
  23. }