Fix subscription status via CLI; derive domain status + badges

This commit is contained in:
2026-03-05 10:10:17 +00:00
parent 37a70cafdd
commit fa43428153
4 changed files with 59 additions and 55 deletions

View File

@@ -52,19 +52,13 @@ type Props = {
function getDomainStatusBadge(status: string | null) {
const normalized = (status ?? "unknown").toLowerCase();
if (
normalized.includes("active") ||
normalized.includes("ok") ||
normalized.includes("enabled")
) {
return "bg-emerald-100 text-emerald-700";
}
if (normalized.includes("suspended") || normalized.includes("disabled")) {
if (normalized.includes("suspend") || normalized.includes("disabled")) {
return "bg-rose-100 text-rose-700";
}
if (normalized.includes("inactive")) return "bg-amber-100 text-amber-700";
if (normalized.includes("active") || normalized.includes("enabled")) {
return "bg-emerald-100 text-emerald-700";
}
return "bg-slate-100 text-slate-600";
}