support TBC/TBD

This commit is contained in:
2023-06-05 19:53:11 +10:00
parent 2f6214c48d
commit 6e511fc4a9
2 changed files with 6 additions and 1 deletions

View File

@@ -158,6 +158,10 @@ const computedAges = (ages: string): string => {
* @returns The converted string.
*/
const computedPrice = (price: string): string => {
if (price.toLowerCase() === "tbd" || price.toLowerCase() === "tbc") {
return price.toUpperCase();
}
const trimmed = parseInt(price.trim());
if (isNaN(trimmed) || trimmed == 0) {
return "Free";