mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Refractor
This commit is contained in:
@@ -18,10 +18,10 @@ export function useSearchMeta(asPath: string) {
|
||||
c = parts[4]
|
||||
}
|
||||
|
||||
if (path !== pathname) setPathname(path)
|
||||
setPathname(path)
|
||||
if (c !== category) setCategory(c)
|
||||
if (b !== brand) setBrand(b)
|
||||
}, [asPath, pathname, category, brand])
|
||||
}, [asPath])
|
||||
|
||||
return { pathname, category, brand }
|
||||
}
|
||||
|
Reference in New Issue
Block a user