import { AlertTriangle, RefreshCw } from 'lucide-react';
import { Card, CardContent } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
/**
* Shared failure state for data-driven pages.
*
* Previously these pages rendered "404 Not Found" (or an empty state) when a
* relay query failed, which told users the content had been deleted — false and
* unactionable. This keeps the failure honest and gives a retry path.
*/
export function ErrorState({
title = 'Couldn’t load this',
description = 'The network request failed. Check your connection and try again.',
onRetry,
className,
}: {
title?: string;
description?: string;
onRetry?: () => void;
className?: string;
}) {
return (
{title} {description}