This commit is contained in:
Ichsan Kurniawan
2026-04-22 14:28:53 +07:00
parent 60d1af3758
commit dbc70a6671
10 changed files with 65 additions and 43 deletions
+1 -4
View File
@@ -3,10 +3,7 @@ import { Badge, STATUS_BADGE_MAP } from "@/components/ui/badge"
export default function BadgeStatus({ status, className }: { status: string, className?: string }) { // e.g. status = "UAT"
return (
<Badge variant={STATUS_BADGE_MAP[status?.toLowerCase()] || "default"} className={className}>
{status?.toLowerCase()
.split(' ')
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ')}
{status}
</Badge>
)
}