diff --git a/client/app/factory/edit/page.tsx b/client/app/factory/edit/page.tsx index 2923faae..beef4fcb 100644 --- a/client/app/factory/edit/page.tsx +++ b/client/app/factory/edit/page.tsx @@ -47,6 +47,9 @@ import DeployBotModal from './components/DeployBotModal'; import Markdown from '@/components/Markdown'; import AgreementZhCN from '../../../.kiwi/zh-CN/agreement.md'; import AgreementEN from '../../../.kiwi/en/agreement.md'; +import AgreementJA from '../../../.kiwi/ja/agreement.md'; +import AgreementKO from '../../../.kiwi/ko/agreement.md'; +import AgreementZhTW from '../../../.kiwi/zh-TW/agreement.md'; const API_HOST = process.env.NEXT_PUBLIC_API_DOMAIN; enum VisibleTypeEnum { @@ -81,6 +84,12 @@ export default function Edit() { switch (language) { case 'zh-CN': return AgreementZhCN; + case 'zh-TW': + return AgreementZhTW; + case 'ja': + return AgreementJA; + case 'ko': + return AgreementKO; case 'en': return AgreementEN; default: @@ -89,7 +98,10 @@ export default function Edit() { }, [language]); useEffect(() => { - if (!user || status !== 'success' || user.id.startsWith('client|')) { + if (status === 'pending') { + return; + } + if (!user || user.id.startsWith('client|')) { router.push(`${apiDomain}/api/auth/login`); } else { if (!user?.agreement_accepted) { @@ -631,30 +643,32 @@ export default function Edit() { {I18N.app.page.agreementLabel} -