From 7e7eabe340573aad1ecde205c4b37656f86f88dd Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 18 Oct 2024 17:06:04 -0400 Subject: [PATCH] Only show related products if exists --- .../products/[category]/[subcategory]/[product]/page.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(category-sidebar)/products/[category]/[subcategory]/[product]/page.tsx b/src/app/(category-sidebar)/products/[category]/[subcategory]/[product]/page.tsx index 4d80ba6..fa9e952 100644 --- a/src/app/(category-sidebar)/products/[category]/[subcategory]/[product]/page.tsx +++ b/src/app/(category-sidebar)/products/[category]/[subcategory]/[product]/page.tsx @@ -75,9 +75,11 @@ export default async function Page(props: {
-

- Explore more products -

+ {related.length > 0 && ( +

+ Explore more products +

+ )}
{related?.map((product) => (