"use client"; import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import { AppEntry } from "@/lib/types"; import { CopyButton } from "@/components/ui/copybutton"; import { Button } from "@/components/ui/button"; interface ResultTableProps { appEntry: AppEntry; getAccessToken: (appEntry: AppEntry) => Promise; } const renderTableRow = (label: string, value: string | undefined) => ( {label} {value} {value && } ); const ResultTable: React.FC = ({ appEntry, getAccessToken, }) => { return ( <> Type Value {renderTableRow("ID", appEntry?.id)} {renderTableRow("Name", appEntry?.name)} {renderTableRow("Website", appEntry?.website || "")} {renderTableRow("Redirect URI", appEntry?.redirect_uri)} {renderTableRow("Client ID", appEntry?.client_id)} {renderTableRow("Client Secret", appEntry?.client_secret)} {renderTableRow("Vapid Key", appEntry?.vapid_key)}
); }; export default ResultTable;