fix: navigate for plugin category

This commit is contained in:
Stephen Zhou
2026-02-12 15:05:52 +08:00
parent 2d3e244a1f
commit 5d5a842f37

View File

@ -39,10 +39,7 @@ export function useActivePluginCategory() {
const categoryFromPath = segments[1] || CATEGORY_ALL
const validatedCategory = getValidatedPluginCategory(categoryFromPath)
const handleChange = (newCategory: string) => {
const newPathSegments = [...segments]
newPathSegments[1] = newCategory
const newPath = `/${newPathSegments.join('/')}`
router.push(newPath)
router.push(`/plugins/${newCategory}`)
}
return [validatedCategory, handleChange] as const
}