Open History to see the last commit
1import { pushHooksApprovalRows } from "@t3tools/client-runtime/state/thread-requests";
2import type { ProviderApprovalPushHooks } from "@t3tools/contracts";
3import { useMessages } from "gt-react";
4
5/** The branch and hooks a push hooks approval names, under its question. */
6export function PushHooksApprovalDetails({ pushHooks }: { pushHooks: ProviderApprovalPushHooks }) {
7 const m = useMessages();
8 return (
9 <dl
10 className="grid min-w-0 grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs text-muted-foreground"
11 data-approval-detail="push-hooks"
12 >
13 {pushHooksApprovalRows(pushHooks, m).map((row, index) => (
14 // oxlint-disable-next-line react/no-array-index-key -- rows never reorder and two hooks may read alike
15 <div key={index} className="contents">
16 <dt className="text-foreground/80">{row.label}</dt>
17 <dd className="min-w-0 select-text wrap-anywhere">
18 {row.name ? <span className="me-2 text-foreground">{row.name}</span> : null}
19 <code className="font-mono text-foreground">{row.code}</code>
20 </dd>
21 </div>
22 ))}
23 </dl>
24 );
25}