mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 16:15:59 +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()
|
const pathname = usePathname()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const params = new URLSearchParams(searchParams)
|
const params = new URLSearchParams(searchParams)
|
||||||
params.delete('mode')
|
if (params.has('mode')) {
|
||||||
router.replace(`${pathname}?${params.toString()}`)
|
params.delete('mode')
|
||||||
|
router.replace(`${pathname}?${params.toString()}`)
|
||||||
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user