updated the 404 whos that pokemon mechanism
This commit is contained in:
@@ -29,7 +29,9 @@ const pokemon = await db.query.cards.findMany({
|
||||
|
||||
// format price to 2 decimal places (or 0 if price >=100) and adds a $ sign, if the price is null it returns "–"
|
||||
const formatPrice = (price:any) => {
|
||||
if (price === null) return "–";
|
||||
if (price === null) {
|
||||
return "—";
|
||||
}
|
||||
price = Number(price);
|
||||
if (price > 99.99) return `$${Math.round(price)}`;
|
||||
return `$${price.toFixed(2)}`;
|
||||
|
||||
Reference in New Issue
Block a user