Use the central admin metric card
This commit is contained in:
@@ -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;}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user