From 6578ae9b54694b1a83ac3e4b83df712b1031fcfd Mon Sep 17 00:00:00 2001 From: Erick Lima Date: Sun, 17 Nov 2024 16:17:08 -0300 Subject: [PATCH] refactor: Add Exception for Reviews on Media Page Added conditional rendering for Reviews component based on availability of reviews nodes --- app/media/[id]/page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/media/[id]/page.tsx b/app/media/[id]/page.tsx index dde129e..156177b 100644 --- a/app/media/[id]/page.tsx +++ b/app/media/[id]/page.tsx @@ -279,7 +279,9 @@ export default async function MediaPage({ )} {/* REVIEWS SECTION */} - + {mediaInfo.reviews?.nodes.length > 0 && ( + + )} {/* RECOMMENDATIONS ACCORDING TO THIS MEDIA */} {mediaInfo.recommendations.edges[0] && (