From c786df59d646fd727345b63983ad172c0ea4a628 Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Tue, 1 Jun 2021 02:02:08 -0500 Subject: [PATCH] Don't use getSlug for category on /search --- pages/search.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/search.tsx b/pages/search.tsx index 71730c46c..55c57c593 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -63,9 +63,7 @@ export default function Search({ const query = filterQuery({ sort }) const { pathname, category, brand } = useSearchMeta(asPath) - const activeCategory = categories.find( - (cat) => getSlug(cat.path) === category - ) + const activeCategory = categories.find((cat) => cat.slug === category) const activeBrand = brands.find( (b) => getSlug(b.node.path) === `brands/${brand}` )?.node