From ebaff744ade4884e7f2fe3d1a990db0a8819d7de Mon Sep 17 00:00:00 2001 From: Sol Irvine Date: Wed, 6 Sep 2023 17:56:19 -0700 Subject: [PATCH] wip: Fixes --- app/[locale]/bar/sagyobar-detail.tsx | 2 +- app/[locale]/product/[handle]/page.tsx | 8 +++++--- components/product/tasting-notes.tsx | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/[locale]/bar/sagyobar-detail.tsx b/app/[locale]/bar/sagyobar-detail.tsx index 784d8f1a7..83fde8e60 100644 --- a/app/[locale]/bar/sagyobar-detail.tsx +++ b/app/[locale]/bar/sagyobar-detail.tsx @@ -26,7 +26,7 @@ export default function SagyobarDetail() {
diff --git a/app/[locale]/product/[handle]/page.tsx b/app/[locale]/product/[handle]/page.tsx index 760ecd6c7..b137230a5 100644 --- a/app/[locale]/product/[handle]/page.tsx +++ b/app/[locale]/product/[handle]/page.tsx @@ -151,9 +151,11 @@ export default async function ProductPage({
-
- -
+ {!!product?.notes && ( +
+ +
+ )} {!!product?.galleryIntro?.value && (
diff --git a/components/product/tasting-notes.tsx b/components/product/tasting-notes.tsx index cf476d3ed..9366acb99 100644 --- a/components/product/tasting-notes.tsx +++ b/components/product/tasting-notes.tsx @@ -8,7 +8,7 @@ export function ProductTastingNotes({ product }: { product: Product }) { const imageHeight = product?.notesImage?.reference?.image?.height; const imageAlt = product?.notesImage?.reference?.image?.altText; - if (!imageUrl && !imageWidth && !imageHeight) { + if (!product?.notes || !imageUrl || !imageWidth || !imageHeight) { return null; }