Apply to all capitalization

This commit is contained in:
Nicolas Mowen 2024-11-05 08:18:37 -07:00
parent 6ccde086e6
commit b1bec351b1
2 changed files with 2 additions and 3 deletions

View File

@ -276,9 +276,7 @@ export default function LivePlayer({
]),
]
.filter((label) => label?.includes("-verified") == false)
.map((label) =>
capitalizeFirstLetter(label.replaceAll("_", " ")),
)
.map((label) => capitalizeFirstLetter(label))
.sort()
.join(", ")
.replaceAll("-verified", "")}

View File

@ -4,6 +4,7 @@ export const capitalizeFirstLetter = (text: string): string => {
export const capitalizeAll = (text: string): string => {
return text
.replaceAll("_", " ")
.split(" ")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ");