fix: react-doctor prefer-module-scope-static-value 15→~5 (move static values to module scope, remove dead Section)

This commit is contained in:
Nora
2026-06-26 05:33:52 -06:00
parent 13d15883b1
commit 6547498ea4
26 changed files with 187 additions and 193 deletions
+8 -7
View File
@@ -1010,14 +1010,15 @@ function StatTile({
);
}
const statusPillMap = {
active: { bg: "bg-[#dcfce7]", fg: "text-[#15803d]", label: "Active" },
inactive: { bg: "bg-[#e8ebe8]", fg: "text-[#57694e]", label: "Inactive" },
closed: { bg: "bg-[#e8ebe8]", fg: "text-[#57694e]", label: "Closed" },
warn: { bg: "bg-[#fef9c3]", fg: "text-[#a16207]", label: "Maint." },
} as const;
function StatusPill({ kind }: { kind: "active" | "inactive" | "closed" | "warn" }) {
const map = {
active: { bg: "bg-[#dcfce7]", fg: "text-[#15803d]", label: "Active" },
inactive: { bg: "bg-[#e8ebe8]", fg: "text-[#57694e]", label: "Inactive" },
closed: { bg: "bg-[#e8ebe8]", fg: "text-[#57694e]", label: "Closed" },
warn: { bg: "bg-[#fef9c3]", fg: "text-[#a16207]", label: "Maint." },
} as const;
const s = map[kind];
const s = statusPillMap[kind];
return (
<span
className={`inline-flex shrink-0 items-center rounded-full px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-wider ${s.bg} ${s.fg}`}