fix: Correct category reference on product detail page.

This commit is contained in:
David Ball 2024-07-11 05:25:02 -04:00
parent 11806bf304
commit dcd4c30e08

View File

@ -33,7 +33,7 @@ const formatAsCurrency = (amount: number) => amount.toLocaleString('en-US', { st
const { productLookup } = Astro.params;
const product = products.find(p => p.slug === productLookup)!;
const category = categories[product.categoryId];
const category = categories.find(c => c.id == product.categoryId)!;
---
<Layout title=`${product?.name} - Dasher Supply`>