fix: use launcher API URL for signup terms and simplify platform settings
This commit is contained in:
@@ -12,7 +12,7 @@ const REMEMBERED_EMAIL_STORAGE_KEY = 'atnmy.lms.admin.login.rememberedEmail';
|
||||
const DEFAULT_EMAIL = '';
|
||||
const DEFAULT_PASSWORD = '';
|
||||
const AUTH_BASE_URL = (import.meta.env.VITE_ATNMY_AUTH_URL ?? import.meta.env.VITE_ADS_IDE_AUTH_URL ?? 'https://auth.autonomystudio.net').replace(/\/+$/, '');
|
||||
const LAUNCHER_API_BASE_URL = (import.meta.env.VITE_ATNMY_STDO_API_BASE_URL ?? 'http://localhost:4200').replace(/\/+$/, '');
|
||||
const LAUNCHER_API_BASE_URL = (import.meta.env.VITE_LAUNCHER_API_BASE_URL ?? 'https://portal-api.autonomystudio.net/api').replace(/\/+$/, '');
|
||||
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
|
||||
export function LoginPage({ onLogin }: LoginPageProps) {
|
||||
@@ -275,7 +275,7 @@ function InstructorSignupForm({ onCancel, onComplete }: InstructorSignupFormProp
|
||||
const title = key === 'terms' ? '이용약관' : '개인정보 처리방침';
|
||||
setTermModal({ title, body: '', loading: true });
|
||||
try {
|
||||
const response = await fetch(`${LAUNCHER_API_BASE_URL}/api/terms/${key}`);
|
||||
const response = await fetch(`${LAUNCHER_API_BASE_URL}/terms/${key}`);
|
||||
if (!response.ok) throw new Error('약관을 불러오지 못했습니다.');
|
||||
const payload = await response.json() as { term?: { body?: string } };
|
||||
setTermModal({ title, body: payload.term?.body || '등록된 약관 내용이 없습니다.', loading: false });
|
||||
@@ -296,7 +296,7 @@ function InstructorSignupForm({ onCancel, onComplete }: InstructorSignupFormProp
|
||||
<span className="h-3 w-px bg-[#d8dde8]" />
|
||||
<h2 className="text-[26px] font-black tracking-[0] text-[#4f46e5]">강사 회원가입</h2>
|
||||
</div>
|
||||
<p className="mt-2.5 text-[13px] font-bold text-[#6b7280]">조직에서 받은 강사 가입 코드를 입력해주세요.</p>
|
||||
<p className="mt-2.5 text-[13px] font-bold text-[#6b7280]">강사 가입 코드를 입력해주세요.</p>
|
||||
</div>
|
||||
<form className="grid gap-3" onSubmit={handleSubmit}>
|
||||
<SignupInput label="이름" value={name} onChange={setName} placeholder="이름을 입력하세요" />
|
||||
|
||||
Reference in New Issue
Block a user