mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 21:51:21 +00:00
Don't use getSlug for category on /search
This commit is contained in:
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user