refactor: AuthCard를 (public) 레이아웃에서 로그인 페이지로 이동
레이아웃이 씌우던 AuthCard를 화면이 직접 두른다. (public) 그룹이 더 이상 모든 하위 화면에 로그인용 껍데기를 강제하지 않으므로, 이 그룹에 다른 성격의 공개 화면을 둘 수 있다. Co-Authored-By: Claude Opus 5
@149ee46907aefcf79558a5a022341986bb1ebcb5
--- app/(public)/layout.tsx
+++ app/(public)/layout.tsx
... | ... | @@ -1,4 +1,3 @@ |
| 1 |
-import { AuthCard } from '@/components/ui/auth-card';
|
|
| 2 | 1 |
|
| 3 | 2 |
// Auth 레이아웃 — design 공용 AuthCard(프라이머리 배경 + 로고 + 카드)로 `(public)` 하위 화면 |
| 4 | 3 |
// (로그인 등)을 감싼다. 화면별 제목은 AuthCard의 title 슬롯 대신 각 페이지 콘텐츠가 자체 |
... | ... | @@ -8,5 +7,5 @@ |
| 8 | 7 |
}: Readonly<{
|
| 9 | 8 |
children: React.ReactNode; |
| 10 | 9 |
}>) {
|
| 11 |
- return <AuthCard>{children}</AuthCard>;
|
|
| 10 |
+ return children; |
|
| 12 | 11 |
} |
--- app/(public)/login/page.tsx
+++ app/(public)/login/page.tsx
... | ... | @@ -1,6 +1,7 @@ |
| 1 |
-import { redirect } from 'next/navigation';
|
|
| 1 |
+import { AuthCard } from '@/components/ui/auth-card';
|
|
| 2 | 2 |
import { getSessionAdmin } from '@/lib/auth/dal';
|
| 3 | 3 |
import { LOGOUT_ERROR_QUERY_PARAM } from '@/lib/constants/logout';
|
| 4 |
+import { redirect } from 'next/navigation';
|
|
| 4 | 5 |
import { LoginForm } from './_components/login-form';
|
| 5 | 6 |
import { LogoutNotice } from './_components/logout-notice';
|
| 6 | 7 |
|
... | ... | @@ -23,9 +24,9 @@ |
| 23 | 24 |
const showLogoutError = typeof logoutError === 'string' && logoutError.length > 0; |
| 24 | 25 |
|
| 25 | 26 |
return ( |
| 26 |
- <> |
|
| 27 |
+ <AuthCard> |
|
| 27 | 28 |
<LogoutNotice showError={showLogoutError} />
|
| 28 | 29 |
<LoginForm /> |
| 29 |
- </> |
|
| 30 |
+ </AuthCard> |
|
| 30 | 31 |
); |
| 31 | 32 |
} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?