@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
tsx 45 lines 1.09 KB
Raw
1 import { Branch, T } from "gt-react";
2
3 import { RefreshIcon } from "~/components/ui/refresh-icon";
4
5 import { cn } from "~/lib/utils";
6
7 import { Button } from "../ui/button";
8
9 import type { ChangeRequestTermKind } from "./changeRequestTerm";
10
11 export function PullRequestActivityUnavailableState({
12 error,
13 term,
14 onRetry,
15 compact = false,
16 }: {
17 error: string;
18 term: ChangeRequestTermKind;
19 onRetry: () => void;
20 compact?: boolean;
21 }) {
22 return (
23 <div
24 className={cn(
25 "flex flex-col items-center justify-center gap-2 text-center",
26 compact ? "py-3" : "min-h-48 px-4 py-10",
27 )}
28 >
29 <p className="text-sm font-medium text-foreground">
30 <T>
31 Could not load{" "}
32 <Branch branch={term} mr="merge request" cr="change request">
33 pull request
34 </Branch>{" "}
35 activity
36 </T>
37 </p>
38 <p className="max-w-md text-xs text-muted-foreground">{error}</p>
39 <Button size="sm" variant="outline" onClick={onRetry}>
40 <RefreshIcon aria-hidden size="sm" />
41 <T>Retry</T>
42 </Button>
43 </div>
44 );
45 }