import { useTranslation } from "react-i18next"; import type { ResourceDTO } from "../common/inventory"; export function ResourceDetail({ resource }: { resource: ResourceDTO }) { const { t, i18n } = useTranslation("resources"); const display = (value: string | number | boolean | undefined) => value === undefined ? t("noValue") : typeof value === "boolean" ? t(value ? "yes" : "no") : String(value); return (
{t("snapshotNotice")}
{resource.values.notes}
)}{new Intl.DateTimeFormat(i18n.language, { dateStyle: "medium", timeStyle: "short", }).format(new Date(revision.recordedAt))}{" "} · {t("recordedBy", { name: revision.actorName })}
{revision.values.name} · {t(revision.values.active ? "active" : "inactive")}
{revision.values.notes}
)}