diff --git a/solution/frontend/src/pages/LoginPage.tsx b/solution/frontend/src/pages/LoginPage.tsx index b4c69ce..dfbd812 100644 --- a/solution/frontend/src/pages/LoginPage.tsx +++ b/solution/frontend/src/pages/LoginPage.tsx @@ -27,9 +27,11 @@ export function LoginPage({selfServe = true}: {selfServe?: boolean}) { const [password, setPassword] = useState('1234'); const [isSubmitting, setIsSubmitting] = useState(false); - // ★ 기본 도착지를 '/' 로 둔다. 앱마다 홈이 다르고(사장님 → 빌더, 내부 → 사업장 목록) - // 각 라우터의 '/' 리다이렉트가 이미 그걸 안다. 여기 경로를 박으면 한쪽에서 404 다. - const from = (location.state as {from?: string} | null)?.from ?? '/'; + // ★ 로그인을 마친 사람의 용건은 "내 것"이다 — 사장님 앱은 /sites 로 보낸다. + // '/' 로 보내면 방금 로그인해 놓고 랜딩(판매 화면)을 보게 된다. + // 내부 운영 앱은 '/' 가 자기 홈으로 리다이렉트하므로 그대로 둔다. + const home = selfServe ? '/sites' : '/'; + const from = (location.state as {from?: string} | null)?.from ?? home; if (user) return ; diff --git a/solution/frontend/src/pages/SignupPage.tsx b/solution/frontend/src/pages/SignupPage.tsx index 4d2691b..3ffad7a 100644 --- a/solution/frontend/src/pages/SignupPage.tsx +++ b/solution/frontend/src/pages/SignupPage.tsx @@ -76,7 +76,8 @@ export function SignupPage() { return; } notify.success('가입이 완료되었습니다.'); - navigate('/', {replace: true}); + // 가입 직후 갈 곳도 내 것이다 — '/' 는 판매 화면(랜딩)이다. + navigate('/sites', {replace: true}); } catch (error) { notifyApiError(error, '가입하지 못했습니다.'); } finally { @@ -97,7 +98,8 @@ export function SignupPage() { notifyApiError({data: res}, '로그인 응답에 토큰이 없습니다.'); return; } - navigate('/', {replace: true}); + // 가입 직후 갈 곳도 내 것이다 — '/' 는 판매 화면(랜딩)이다. + navigate('/sites', {replace: true}); } catch (error) { notifyApiError(error, '구글로 가입하지 못했습니다.'); } finally {