Use the central admin metric card

This commit is contained in:
2026-07-21 13:19:20 +02:00
parent e8cb9d4fb2
commit 0fcd4dc06f

View File

@@ -1,7 +1,7 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import type { ApiSettings } from "@govoplan/core-webui"; import type { ApiSettings } from "@govoplan/core-webui";
import { fetchAdminOverview, type AdminOverview } from "../../api/admin"; import { fetchAdminOverview, type AdminOverview } from "../../api/admin";
import { Card } from "@govoplan/core-webui"; import { Card, MetricCard } from "@govoplan/core-webui";
import { Button } from "@govoplan/core-webui"; import { Button } from "@govoplan/core-webui";
import { AdminPageLayout, adminErrorMessage } from "@govoplan/core-webui"; import { AdminPageLayout, adminErrorMessage } from "@govoplan/core-webui";
@@ -116,7 +116,7 @@ function hasAnySection(sections: ReadonlySet<string>, candidates: readonly strin
} }
function Metric({ title, value, text }: {title: string;value: string | number;text: string;}) { function Metric({ title, value, text }: {title: string;value: string | number;text: string;}) {
return <Card title={title}><strong className="module-big-number">{value}</strong><p className="muted">{text}</p></Card>; return <MetricCard label={title} value={value} detail={text} />;
} }
function AreaLink({ title, text, onClick }: {title: string;text: string;onClick: () => void;}) { function AreaLink({ title, text, onClick }: {title: string;text: string;onClick: () => void;}) {