Conversation
- 카카오/애플 로그인 콜백에서 userProfile(email, nickname, profileImage) 디스트럭처링 - setUserProfileCookie 헬퍼 추가: httpOnly 쿠키에 JSON 형태로 저장 - refreshToken과 동일한 수명(7일) 설정 - UserProfile 타입 정의 (data/models/member.ts) - 마이페이지에서 사용자 정보 표시를 위한 데이터 기반 마련
- page.tsx: 서버 컴포넌트에서 userProfile 쿠키 파싱하여 프로필 데이터 전달 - MyPageClient.tsx: 사용자 정보(닉네임, 이메일), 설정 목록, 로그아웃/회원탈퇴 UI 구현 - 알림 설정 토글 (로컬 상태, 추후 백엔드 연동 확장 가능) - 버전 정보 (v1.0.0), 서비스 문의 이메일 표시 - 로그아웃/회원탈퇴 시 ConfirmModal로 사용자 확인 후 처리 - Toggle.tsx: 피그마 디자인 기반 토글 스위치 컴포넌트 (50x30, orange-500 활성색) - 디자인 시스템 토큰 적용: neutral-100 배경, neutral-300 구분선, body-3/label-1 타이포그래피
- 프로필 아이콘 클릭 시 ComingSoonModal 대신 /mypage로 이동하도록 Link 컴포넌트 적용 - 홈 화면의 임시 로그아웃/회원탈퇴 버튼 제거 (마이페이지에서 제공) - 불필요해진 ComingSoonModal, useDisclosure(comingSoon), logout/withdraw import 제거
- ConfirmModal: description prop 추가 (whitespace-pre-line 지원) - ConfirmModal: 제목 body-3 → body-2 font-semibold text-neutral-1600 (18px) - ConfirmModal: 버튼 간격 gap-4 → gap-[11px] - 로그아웃 모달: "하시겠어요?" 텍스트 및 안내 문구 추가 - 회원탈퇴 모달: "하시겠어요?" 텍스트 및 계정 삭제 경고 문구 추가
- 피그마 디자인 스펙에 맞게 max-w-[310px] → max-w-[320px] 수정
- 버튼 높이 52px 적용 (py-[14px] 오버라이드) - icon prop 추가: 아이콘 모달 변형 지원 (아이콘 + 단일 확인 버튼) - onCancel optional로 변경: cancel 없이 단일 버튼 구성 가능 - 아이콘 유무에 따라 레이아웃 분기 처리
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
체크리스트
참고 자료
없음
목적
소셜 로그인 후 유저 프로필 정보를 활용하여 마이페이지를 구현합니다.
아울러 ConfirmModal 컴포넌트를 피그마 스펙에 맞게 개선하고 아이콘 변형을 지원합니다.
과정
1. 유저 프로필 쿠키 저장
auth/callback/route.ts: 소셜 로그인 응답의userProfile필드를 httpOnly 쿠키에 JSON으로 저장data/models/member.ts:UserProfile타입 정의 (email,nickname,profileImage)2. 마이페이지 구현
mypage/page.tsx: 서버 컴포넌트에서 쿠키 파싱 후 프로필 전달MyPageClient.tsx: 유저 정보 표시, 알림 설정 토글, 버전/서비스 문의, 로그아웃/회원탈퇴Toggle.tsx: 50×30 커스텀 토글 컴포넌트 (orange-500)3. 홈 화면 연결
HomePageLayout.tsx: 프로필 아이콘 버튼 →/mypage링크로 변경, 임시 로그아웃/탈퇴 버튼 제거4. ConfirmModal 개선
BaseModal.tsx: 최대 너비 310 → 320pxConfirmModal.tsx: 버튼 높이 52px,iconprop 추가(아이콘 상단 표시 변형),onCanceloptional로 변경파일 구조
쿠키/상태 관리
userProfile