fix: render enum labels as proper title case

formatEnumLabel was leaving inputs uppercase ("TECHNOLOGY_INNOVATION"
became "TECHNOLOGY INNOVATION"); lowercasing first yields proper
title case ("Technology Innovation") and improves labels app-wide.
Apply it on the project mentor page for Ocean Issue + Category.
This commit is contained in:
Matt
2026-04-28 16:28:30 +02:00
parent 26ff8ed111
commit e37f3a5874
2 changed files with 8 additions and 3 deletions

View File

@@ -50,6 +50,7 @@ export function formatFileSize(bytes: number): string {
export function formatEnumLabel(value: string): string {
return value
.toLowerCase()
.replace(/_/g, ' ')
.replace(/\b\w/g, (c) => c.toUpperCase())
}