Deploy to VPS / deploy (push) Failing after 1m45s
- 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.
28 lines
783 B
TypeScript
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>
|
|
);
|
|
}
|