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

View File

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