1
0
mirror of https://github.com/vercel/commerce.git synced 2025-07-15 08:51:21 +00:00

Don't use getSlug for category on /search

This commit is contained in:
Luis Alvarez 2021-06-01 02:02:08 -05:00
parent c4d30113d9
commit c786df59d6

@ -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