mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
fix: navigate for plugin category
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user