"use client";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { AppEntry } from "@/lib/types";
import { CopyButton } from "./ui/copybutton";
const renderTableRow = (label: string, value: string | undefined) => (
{label}
{value}
{value && }
);
const DataDisplay = ({ appEntry }: { appEntry: AppEntry }) => {
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 DataDisplay;