Files
t3code/apps/web/src/components/pullRequest/PullRequestsUnavailableState.tsx
T
cad2c93616 feat: multi-provider pull requests page with in-app reviews (#4849)
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]>
2026-08-10 17:47:02 +02:00

44 lines
1.1 KiB
TypeScript

import { GitPullRequestIcon, RefreshCwIcon } from "lucide-react";
import { Button } from "../ui/button";
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "../ui/empty";
export function PullRequestsUnavailableState({
title = "Could not load pull requests",
error,
onRetry,
}: {
title?: string;
error: string;
onRetry?: () => void;
}) {
return (
<Empty className="px-4 py-16 md:px-4">
<EmptyMedia variant="icon">
<GitPullRequestIcon />
</EmptyMedia>
<EmptyHeader>
<EmptyTitle>{title}</EmptyTitle>
{/* The caller names the fix — update the environment, install gh, sign in — so this
shows its message rather than trying to infer one from the failure text. */}
<EmptyDescription>{error}</EmptyDescription>
</EmptyHeader>
{onRetry ? (
<EmptyContent>
<Button size="sm" variant="outline" onClick={onRetry}>
<RefreshCwIcon className="size-3.5" />
Retry
</Button>
</EmptyContent>
) : null}
</Empty>
);
}