hackathon-template/components/chat/chat-error.tsx

12 lines
371 B
TypeScript

import { AlertTriangleIcon } from "lucide-react";
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
export function ChatError({ error }: { error: Error }) {
return (
<Alert variant="destructive">
<AlertTriangleIcon />
<AlertTitle>{error.name}</AlertTitle>
<AlertDescription>{error.message}</AlertDescription>
</Alert>
);
}