1import { RefreshIcon } from "~/components/ui/refresh-icon";
2
3import { cn } from "~/lib/utils";
4
5import { Button } from "../ui/button";
6
7export function PullRequestActivityUnavailableState({
8 error,
9 onRetry,
10 compact = false,
11}: {
12 error: string;
13 onRetry: () => void;
14 compact?: boolean;
15}) {
16 return (
17 <div
18 className={cn(
19 "flex flex-col items-center justify-center gap-2 text-center",
20 compact ? "py-3" : "min-h-48 px-4 py-10",
21 )}
22 >
23 <p className="text-sm font-medium text-foreground">Could not load pull request activity</p>
24 <p className="max-w-md text-xs text-muted-foreground">{error}</p>
25 <Button size="sm" variant="outline" onClick={onRetry}>
26 <RefreshIcon aria-hidden size="sm" />
27 Retry
28 </Button>
29 </div>
30 );
31}