"use client"; import Link from "next/link"; import { useMemo, useState } from "react"; import { insertSetting, deleteSetting, updateSetting, } from "@/app/actions/settings-actions"; import { coinsToRc, parseStoredCoins, rcToCoins, } from "@/lib/coins-rc"; import type { DbSetting } from "@/types/database"; type Props = { rows: DbSetting[]; saveError: boolean; addError: string | null; readOnly?: boolean; }; function ReadOnlySettingRow({ row }: { row: DbSetting }) { return (
{row.key}
{row.value?.trim() ? row.value : "—"}
No settings rows yet.
) : (Back to dashboard
No settings rows yet. Add one below.
) : (That key already exists. Edit it in the list above instead.
) : addError === "missing" ? (Enter a non-empty key.
) : addError === "missingValue" ? (Enter a non-empty value.
) : addError === "config" ? (Supabase admin client is not configured.
) : addError === "other" ? (Could not insert. Check constraints and retry.
) : null}Back to dashboard