updated the 404 whos that pokemon mechanism

This commit is contained in:
zach
2026-02-23 07:53:57 -05:00
parent bdcf90b0d9
commit dfc2e9eaf5
8 changed files with 130 additions and 51 deletions

View File

@@ -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)}`;