Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: maria <[email protected]> Co-authored-by: maria-rcks <[email protected]> Co-authored-by: codex <[email protected]>
32 lines
801 B
TypeScript
32 lines
801 B
TypeScript
import { RefreshCwIcon } from "lucide-react";
|
|
|
|
import { cn } from "~/lib/utils";
|
|
|
|
import { Button } from "../ui/button";
|
|
|
|
export function PullRequestActivityUnavailableState({
|
|
error,
|
|
onRetry,
|
|
compact = false,
|
|
}: {
|
|
error: string;
|
|
onRetry: () => void;
|
|
compact?: boolean;
|
|
}) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"flex flex-col items-center justify-center gap-2 text-center",
|
|
compact ? "py-3" : "min-h-48 px-4 py-10",
|
|
)}
|
|
>
|
|
<p className="text-sm font-medium text-foreground">Could not load pull request activity</p>
|
|
<p className="max-w-md text-xs text-muted-foreground">{error}</p>
|
|
<Button size="sm" variant="outline" onClick={onRetry}>
|
|
<RefreshCwIcon aria-hidden className="size-3.5" />
|
|
Retry
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|