mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-02 19:27:48 +08:00
fix: router replace in Explore page (#4918)
This commit is contained in:
parent
e121788ff5
commit
c212700341
@ -80,8 +80,10 @@ const TextGeneration: FC<IMainProps> = ({
|
||||
const pathname = usePathname()
|
||||
useEffect(() => {
|
||||
const params = new URLSearchParams(searchParams)
|
||||
params.delete('mode')
|
||||
router.replace(`${pathname}?${params.toString()}`)
|
||||
if (params.has('mode')) {
|
||||
params.delete('mode')
|
||||
router.replace(`${pathname}?${params.toString()}`)
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user