wip: Fixes

This commit is contained in:
Sol Irvine 2023-09-06 17:56:19 -07:00
parent 391ca16f8f
commit ebaff744ad
3 changed files with 7 additions and 5 deletions

View File

@ -26,7 +26,7 @@ export default function SagyobarDetail() {
<div <div
className={clsx( className={clsx(
'font-multilingual mx-auto flex w-full flex-col space-y-12 py-12 text-left font-extralight md:flex-row md:space-x-6 md:space-y-0 md:py-24 md:pb-24' 'font-multilingual mx-auto mx-auto flex w-full max-w-screen-2xl flex-col space-y-12 py-12 text-left font-extralight md:flex-row md:space-x-6 md:space-y-0 md:py-24 md:pb-24'
)} )}
> >
<div className="flex flex-col space-y-4 md:w-1/2"> <div className="flex flex-col space-y-4 md:w-1/2">

View File

@ -151,9 +151,11 @@ export default async function ProductPage({
</div> </div>
</div> </div>
{!!product?.notes && (
<div className="bg-base p-12 text-dark"> <div className="bg-base p-12 text-dark">
<ProductTastingNotes product={product} /> <ProductTastingNotes product={product} />
</div> </div>
)}
{!!product?.galleryIntro?.value && ( {!!product?.galleryIntro?.value && (
<div className="font-multilingual flex w-full flex-row justify-end whitespace-pre-line"> <div className="font-multilingual flex w-full flex-row justify-end whitespace-pre-line">

View File

@ -8,7 +8,7 @@ export function ProductTastingNotes({ product }: { product: Product }) {
const imageHeight = product?.notesImage?.reference?.image?.height; const imageHeight = product?.notesImage?.reference?.image?.height;
const imageAlt = product?.notesImage?.reference?.image?.altText; const imageAlt = product?.notesImage?.reference?.image?.altText;
if (!imageUrl && !imageWidth && !imageHeight) { if (!product?.notes || !imageUrl || !imageWidth || !imageHeight) {
return null; return null;
} }