chore: feat/legal 병합

This commit is contained in:
minaChoi committed 2026-10-08 09:23:07 +09:00
commit 343e3ee2fb
7 files changed
+422 -1

No files matched your search

+6 -1
View File
@@ -27,6 +27,7 @@ import { useRegion } from './regionContext'
import { useSky } from './skyContext'
import { SHARE_SIZES, shareImage, type ShareSize } from './storyImage'
import { SheetContext, useSheet, type SharePayload, type SheetState } from './sheetContext'
import { LegalConsent, LegalLinks, LegalSheet } from './legal/LegalSheet'
import { HeartIcon } from './svg'
import { Avatar, Ic, Skel, StateBox, TAP44, Thumb } from './ui'
@@ -70,7 +71,7 @@ export function SheetProvider({ children }: { children: ReactNode }) {
)
}
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기' } as const
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', privacy: '개인정보처리방침', terms: '이용약관' } as const
/** 아래에서 올라오는 창: 네이티브 <dialog>라 ESC·포커스 가두기·포커스 되돌리기가 기본으로 된다 */
function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void }) {
@@ -130,6 +131,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
{state.type === 'login' && <LoginSheet onDone={onClose} onLoggedIn={then ? () => open(then) : onClose} />}
{state.type === 'me' && <MeSheet onDone={onClose} />}
{state.type === 'region' && <RegionSheet onDone={onClose} />}
{(state.type === 'privacy' || state.type === 'terms') && <LegalSheet kind={state.type} />}
</div>
)}
</dialog>
@@ -815,6 +817,7 @@ function LoginSheet({ onDone, onLoggedIn }: { onDone: () => void; onLoggedIn: ()
<button type="button" onClick={onDone} className="cursor-pointer rounded-[14px] p-[13px] text-[15px] font-extrabold text-(--ink2)">
나중에 할게요
</button>
<LegalConsent />
</form>
</Body>
)
@@ -939,6 +942,7 @@ function MeSheet({ onDone }: { onDone: () => void }) {
>
로그아웃
</button>
<LegalLinks />
</Body>
)
}
@@ -998,6 +1002,7 @@ function RegionSheet({ onDone }: { onDone: () => void }) {
{me ? '로그아웃' : '로그인'}
</button>
</p>
<LegalLinks className="mt-2" />
</Body>
)
}