Fix price display issues and layout in design review page

- Add defensive checks in cart store to handle missing/NaN unitPrice values
- Display '—' for items with invalid prices instead of NaN
- Fix design review page grid layout to align buttons at top of page
- Ensure buttons don't get pushed below images on review page
This commit is contained in:
Andymick
2026-07-18 19:46:11 +01:00
parent 1b5a9f8d28
commit 62ae2755f0
4 changed files with 12 additions and 4 deletions
+5 -1
View File
@@ -147,7 +147,11 @@ export default function CartPage() {
</div>
<div className="w-24 text-right font-mono text-sm">
<Price cents={item.unitPrice * item.quantity} />
{Number.isFinite(item.unitPrice) ? (
<Price cents={item.unitPrice * item.quantity} />
) : (
<span className="text-muted"></span>
)}
</div>
<button
+1 -1
View File
@@ -124,7 +124,7 @@ export default function DesignReviewPage({ params }: { params: { id: string } })
<h1 className="font-display text-3xl mb-2">{design.product.name}</h1>
<p className="text-muted mb-8">Review your personalized design</p>
<div className="grid gap-8 md:grid-cols-2">
<div className="grid gap-8 md:grid-cols-2 md:items-start">
{/* Design Preview */}
<div className="space-y-4">
<div>