mirror of
https://github.com/vercel/commerce.git
synced 2025-06-20 06:01: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 query = filterQuery({ sort })
|
||||||
|
|
||||||
const { pathname, category, brand } = useSearchMeta(asPath)
|
const { pathname, category, brand } = useSearchMeta(asPath)
|
||||||
const activeCategory = categories.find(
|
const activeCategory = categories.find((cat) => cat.slug === category)
|
||||||
(cat) => getSlug(cat.path) === category
|
|
||||||
)
|
|
||||||
const activeBrand = brands.find(
|
const activeBrand = brands.find(
|
||||||
(b) => getSlug(b.node.path) === `brands/${brand}`
|
(b) => getSlug(b.node.path) === `brands/${brand}`
|
||||||
)?.node
|
)?.node
|
||||||
|
Loading…
x
Reference in New Issue
Block a user