fix: Correct category reference on product detail page.
This commit is contained in:
parent
11806bf304
commit
dcd4c30e08
|
@ -33,7 +33,7 @@ const formatAsCurrency = (amount: number) => amount.toLocaleString('en-US', { st
|
||||||
|
|
||||||
const { productLookup } = Astro.params;
|
const { productLookup } = Astro.params;
|
||||||
const product = products.find(p => p.slug === productLookup)!;
|
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`>
|
<Layout title=`${product?.name} - Dasher Supply`>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user