fix: use NextJS basePath and WEB_PREFIX to support custom prefix (#19497)

Co-authored-by: johnny0120 <15564476+johnny0120@users.noreply.github.com>
This commit is contained in:
johnny0120
2025-05-12 13:44:41 +08:00
committed by GitHub
parent d1c55cb901
commit 49af07f444
33 changed files with 87 additions and 69 deletions

View File

@@ -5,7 +5,7 @@ import { useRouter } from 'next/navigation'
import Toast from '../components/base/toast'
import Loading from '../components/base/loading'
import Button from '@/app/components/base/button'
import { basePath } from '@/utils/var'
import { WEB_PREFIX } from '@/config'
import { fetchInitValidateStatus, initValidate } from '@/service/common'
import type { InitValidateStatusResponse } from '@/models/common'
@@ -42,7 +42,7 @@ const InitPasswordPopup = () => {
useEffect(() => {
fetchInitValidateStatus().then((res: InitValidateStatusResponse) => {
if (res.status === 'finished')
window.location.href = `${basePath}/install`
window.location.href = `${WEB_PREFIX}/install`
else
setLoading(false)
})