mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +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