浏览代码

fix: router replace in Explore page (#4918)

tags/0.6.10
Nam Vu 1年前
父节点
当前提交
c212700341
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      web/app/components/share/text-generation/index.tsx

+ 4
- 2
web/app/components/share/text-generation/index.tsx 查看文件

@@ -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
}, [])


正在加载...
取消
保存