fix: keep search params in web app url when needs authorize (#21717)

This commit is contained in:
NFish
2025-06-30 18:28:31 +08:00
committed by GitHub
parent 18757d07c9
commit 9588a64487
8 changed files with 33 additions and 22 deletions

View File

@@ -85,14 +85,6 @@ const TextGeneration: FC<IMainProps> = ({
const router = useRouter()
const pathname = usePathname()
useEffect(() => {
const params = new URLSearchParams(searchParams)
if (params.has('mode')) {
params.delete('mode')
router.replace(`${pathname}?${params.toString()}`)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
// Notice this situation isCallBatchAPI but not in batch tab
const [isCallBatchAPI, setIsCallBatchAPI] = useState(false)