From c14e7fbdb39a5686acc6c4e7600787957408beaf Mon Sep 17 00:00:00 2001 From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:39:52 +0400 Subject: [PATCH] Ensure product images conditional rendering in astro file Updated 'src/pages/products/[...slug].astro' to conditionally render product images only when they exist. Prevents potential errors or breaks in layout when there is an absence of either 'first' or 'second' blueprint images for a particular product. --- src/pages/products/[...slug].astro | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/pages/products/[...slug].astro b/src/pages/products/[...slug].astro index 3210ec0..edbd11c 100644 --- a/src/pages/products/[...slug].astro +++ b/src/pages/products/[...slug].astro @@ -168,21 +168,25 @@ const { product } = Astro.props;
- Blueprint Illustration + {product.data.blueprints.first && + Blueprint Illustration + }
- Blueprint Illustration + {product.data.blueprints.second && + Blueprint Illustration + }