Update return type for Facebook verification

This commit is contained in:
Darren Clarke 2024-05-16 13:00:18 +02:00
parent f6dc60eb08
commit e22a8e8d98
7 changed files with 939 additions and 475 deletions

View file

@ -6,6 +6,7 @@ import { useRouter } from "next/navigation";
import { DisplayTextField, Button, Dialog, colors, typography } from "ui";
import { Selectable } from "kysely";
import { type Database } from "bridge-common";
import { QRCode } from "./QRCode";
import { generateDeleteAction } from "../lib/actions";
import { serviceConfig } from "../config/config";
import { FieldDescription } from "../lib/service";
@ -70,13 +71,24 @@ export const Detail: FC<DetailProps> = ({ service, row }) => {
<Grid container direction="row" rowSpacing={3} columnSpacing={2}>
{fields.map((field: FieldDescription) => (
<Grid item xs={field.size ?? 6} key={field.name}>
<DisplayTextField
name={field.name}
label={field.label}
lines={field.lines ?? 1}
value={row[field.name] as string}
copyable={field.copyable ?? false}
/>
{field.kind === "qrcode" && (
<QRCode
name={field.name}
label={field.label}
getValue={field.getValue}
id={row["id"] as string}
helperText={field.helperText}
/>
)}
{(!field.kind || field.kind === "text") && (
<DisplayTextField
name={field.name}
label={field.label}
lines={field.lines ?? 1}
value={row[field.name] as string}
copyable={field.copyable ?? false}
/>
)}
</Grid>
))}
</Grid>