2026-07-26 16:14:32 +07:00
|
|
|
import { AlertCircle, RefreshCw } from "lucide-react";
|
2026-08-14 10:49:44 +07:00
|
|
|
import { Button } from "@/components/primitives/button";
|
2026-07-26 16:14:32 +07:00
|
|
|
|
|
|
|
|
interface ErrorStateProps {
|
|
|
|
|
message: string;
|
|
|
|
|
onRetry?: () => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ErrorState({ message, onRetry }: ErrorStateProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col items-center justify-center py-20 text-center">
|
2026-08-14 10:49:44 +07:00
|
|
|
<AlertCircle className="size-10 text-[var(--color-vermilion)] mb-3" />
|
|
|
|
|
<p className="text-sm text-[var(--color-ink-soft)] mb-4 max-w-sm">
|
|
|
|
|
{message}
|
|
|
|
|
</p>
|
2026-07-26 16:14:32 +07:00
|
|
|
{onRetry && (
|
|
|
|
|
<Button variant="outline" onClick={onRetry}>
|
|
|
|
|
<RefreshCw className="size-4 mr-2" />
|
|
|
|
|
Retry
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|