Kaynağa Gözat

fix: router replace in Explore page (#4918)

tags/0.6.10
Nam Vu 1 yıl önce
ebeveyn
işleme
c212700341
No account linked to committer's email address

+ 4
- 2
web/app/components/share/text-generation/index.tsx Dosyayı Görüntüle

@@ -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…
İptal
Kaydet