Files
GMW/services/frontend/src/components/shared/error-state.tsx
T
asepharyana d5a547eb25
Deploy to VPS / deploy (push) Failing after 1m45s
feat: add app header, sidebar, and mobile navigation components
- Implemented AppHeader component with theme toggle and connection status.
- Created AppSidebar component for navigation with connection status indicator.
- Added MobileNav component for mobile navigation with responsive design.
- Introduced shared components: DetailStat, EmptyState, ErrorState, LoadingSkeleton, and StatCard for consistent UI.
- Developed hooks for async data fetching: useAsync, useConfig, useDashboard, useGuilds, useMedia, useMessages, useRecordings, and useVoice.
- Added chatbot API functions for sending messages and managing chat history.
2026-07-26 16:14:32 +07:00

28 lines
783 B
TypeScript

import { AlertCircle, RefreshCw } from "lucide-react";
import { Button } from "@/components/ui/button";
interface ErrorStateProps {
message: string;
onRetry?: () => void;
}
/**
* Consistent error state for data-fetching pages.
* Shows the error message with an optional retry button.
*/
export function ErrorState({ message, onRetry }: ErrorStateProps) {
return (
<div className="flex flex-col items-center justify-center py-20 text-center">
<AlertCircle className="size-10 text-destructive mb-3" />
<p className="text-sm text-muted-foreground mb-4 max-w-sm">{message}</p>
{onRetry && (
<Button variant="outline" onClick={onRetry}>
<RefreshCw className="size-4 mr-2" />
Retry
</Button>
)}
</div>
);
}