diff --git a/src/components/common/loading-states.tsx b/src/components/common/loading-states.tsx new file mode 100644 index 0000000..1db6bb6 --- /dev/null +++ b/src/components/common/loading-states.tsx @@ -0,0 +1,77 @@ +import Image from "next/image"; +import { AlertTriangle, Inbox, Lock } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent } from "@/components/ui/card"; + +export function SkeletonPanel() { + return ( +
+ {Array.from({ length: 8 }, (_, index) => ( +
+ ))} +
+ ); +} + +export function EmptyState({ + title = "No records", + description, +}: { + title?: string; + description: string; +}) { + return ( + + + + + + +

{title}

+

{description}

+
+
+ ); +} + +export function ErrorState({ message, onRetry }: { message: string; onRetry?: () => void }) { + return ( + + + + + +

Something needs attention

+

{message}

+ {onRetry ? ( + + ) : null} +
+
+ ); +} + +export function PermissionDeniedState() { + return ( + + + + + +

Permission required

+

+ Your current role cannot access this module. Request access from a server + administrator. +

+
+
+ ); +}