From c4d30113d95fc3622d20750bace32f6d3007e0b6 Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Tue, 1 Jun 2021 01:55:17 -0500 Subject: [PATCH] Fixed category normalizer in shopify --- components/common/Navbar/Navbar.tsx | 12 +++++------- framework/shopify/utils/normalize.ts | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/components/common/Navbar/Navbar.tsx b/components/common/Navbar/Navbar.tsx index aa49993f3..16088485f 100644 --- a/components/common/Navbar/Navbar.tsx +++ b/components/common/Navbar/Navbar.tsx @@ -27,13 +27,11 @@ const Navbar: FC = ({ links }) => ( All - {links - ? links.map((l) => ( - - {l.label} - - )) - : null} + {links?.map((l) => ( + + {l.label} + + ))} diff --git a/framework/shopify/utils/normalize.ts b/framework/shopify/utils/normalize.ts index 56764b95d..eaa958159 100644 --- a/framework/shopify/utils/normalize.ts +++ b/framework/shopify/utils/normalize.ts @@ -185,8 +185,7 @@ export const normalizePages = (edges: PageEdge[], locale: string): Page[] => export const normalizeCategory = (category: any): Category => ({ id: category.id, - name: category.name, + name: category.title, slug: category.handle, path: `/${category.handle}`, }) -