From 52d81453fba621d25b199292f8df79def3faf821 Mon Sep 17 00:00:00 2001
From: Aanchal Pawar <97873570+glo82145@users.noreply.github.com>
Date: Wed, 31 Jul 2024 14:00:49 +0530
Subject: [PATCH] PWA-3307::[Cloud] Language translating giving errors (#4301)
* PWA-3307::[Cloud] Language translating giving errors
* PWA-3307::[Cloud] Language translating giving errors
* PWA-3307::[Cloud] Language translating giving errors
* PWA-3307::[Cloud] Language translating giving errors
---
.../categoryContent.spec.js.snap | 126 ++++++++++--------
.../Category/categoryContent.js | 88 ++++++------
2 files changed, 120 insertions(+), 94 deletions(-)
diff --git a/packages/venia-ui/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap b/packages/venia-ui/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap
index 5de4b6d5a3..976f91340f 100644
--- a/packages/venia-ui/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap
+++ b/packages/venia-ui/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`filter button/modal does not render if there are no filters 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -19,7 +19,9 @@ Array [
@@ -94,16 +96,16 @@ Array [
- ,
-]
+
+
`;
exports[`filter button/modal renders when there are filters 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -117,7 +119,9 @@ Array [
@@ -206,16 +210,16 @@ Array [
/>
- ,
-]
+
+
`;
exports[`filter sidebar does not render if not in viewport 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -229,7 +233,9 @@ Array [
@@ -318,16 +324,16 @@ Array [
/>
- ,
-]
+
+
`;
exports[`filter sidebar renders when in viewport 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -341,7 +347,9 @@ Array [
@@ -438,16 +446,16 @@ Array [
/>
- ,
-]
+
+
`;
exports[`renders empty page 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -461,7 +469,9 @@ Array [
- Empty Name
+
+ Empty Name
+
@@ -489,16 +499,16 @@ Array [
/>
- ,
-]
+
+
`;
exports[`renders loading indicator if no data and loading 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -512,7 +522,9 @@ Array [
@@ -558,16 +570,16 @@ Array [
/>
- ,
-]
+
+
`;
exports[`renders the correct tree 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -581,7 +593,9 @@ Array [
@@ -656,16 +670,16 @@ Array [
- ,
-]
+
+
`;
exports[`sort button/container does not render if there are no products 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -679,7 +693,9 @@ Array [
@@ -707,16 +723,16 @@ Array [
/>
- ,
-]
+
+
`;
exports[`sort button/container renders when there are products 1`] = `
-Array [
+
,
- "Title",
+ />
+ Title
@@ -730,7 +746,9 @@ Array [
@@ -805,6 +823,6 @@ Array [
- ,
-]
+
+
`;
diff --git a/packages/venia-ui/lib/RootComponents/Category/categoryContent.js b/packages/venia-ui/lib/RootComponents/Category/categoryContent.js
index a79fc4150a..c3cbd4eb2e 100644
--- a/packages/venia-ui/lib/RootComponents/Category/categoryContent.js
+++ b/packages/venia-ui/lib/RootComponents/Category/categoryContent.js
@@ -101,13 +101,16 @@ const CategoryContent = props => {
const categoryResultsHeading =
totalCount > 0 ? (
-
+
+ {' '}
+ {' '}
+
) : isLoading ? (
) : null;
@@ -151,45 +154,50 @@ const CategoryContent = props => {
return (
-
- {categoryName}
-
-
-
-
- {categoryTitle}
-
-
- {categoryDescriptionElement}
-
-
-
- }>
- {shouldRenderSidebarContent ? sidebar : null}
-
-
-
-
+
+
+
{categoryName}
+
+
+
- {categoryResultsHeading}
+
{categoryTitle}
-
- {maybeFilterButtons}
- {maybeSortButton}
+
+ {categoryDescriptionElement}
+
+
+
+ }>
+ {shouldRenderSidebarContent ? sidebar : null}
+
+
+
+
+
+ {categoryResultsHeading}
+
+
+ {maybeFilterButtons}
+ {maybeSortButton}
+
+ {maybeSortContainer}
- {maybeSortContainer}
+ {content}
+
{filtersModal}
- {content}
-
{filtersModal}
-
-
+
+
);
};