From 095b4e4636140cc392987c31c403e045eba3ae20 Mon Sep 17 00:00:00 2001 From: Park Se Hyun <> Date: Tue, 14 Jan 2025 19:56:08 +0800 Subject: [PATCH 1/3] bring no results message out of the collectionresults div --- .../layouts/Collection/CollectionResults.tsx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx b/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx index 6c96fd81a..87b2fa431 100644 --- a/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx +++ b/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx @@ -102,21 +102,21 @@ export const CollectionResults = ({ /> ), )} - {paginatedItems.length === 0 && ( -
-

- We couldn’t find any articles. Try different search terms or - filters. -

- -
- )} + {paginatedItems.length === 0 && ( +
+

+ We couldn’t find any articles. Try different search terms or + filters. +

+ +
+ )} ) } From a9088ca0d48a2641013a9d56bb73349d062081d3 Mon Sep 17 00:00:00 2001 From: Park Se Hyun <> Date: Tue, 14 Jan 2025 20:18:44 +0800 Subject: [PATCH 2/3] remove extra empty div --- .../next/layouts/Collection/CollectionResults.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx b/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx index 87b2fa431..8d6676ecb 100644 --- a/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx +++ b/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx @@ -81,9 +81,9 @@ export const CollectionResults = ({ {/* NOTE: DO NOT add h-full to this div as it will break old browsers */} -
- {paginatedItems.length > 0 && - paginatedItems.map((item) => + {paginatedItems.length !== 0 ? ( +
+ {paginatedItems.map((item) => variant === "collection" ? ( ), )} -
- {paginatedItems.length === 0 && ( +
+ ) : (

We couldn’t find any articles. Try different search terms or From 4ac1e9fb58ad78108d356304cf6f487720079f6e Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Tue, 14 Jan 2025 21:30:59 +0800 Subject: [PATCH 3/3] replace !== 0 with > 0 --- .../src/templates/next/layouts/Collection/CollectionResults.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx b/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx index 8d6676ecb..217e59b41 100644 --- a/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx +++ b/packages/components/src/templates/next/layouts/Collection/CollectionResults.tsx @@ -81,7 +81,7 @@ export const CollectionResults = ({

{/* NOTE: DO NOT add h-full to this div as it will break old browsers */} - {paginatedItems.length !== 0 ? ( + {paginatedItems.length > 0 ? (
{paginatedItems.map((item) => variant === "collection" ? (