Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] 프로필수정 페이지 리팩토링 #132

Open
5 of 6 tasks
Stilllee opened this issue Jan 22, 2025 · 0 comments
Open
5 of 6 tasks

[Refactor] 프로필수정 페이지 리팩토링 #132

Stilllee opened this issue Jan 22, 2025 · 0 comments
Assignees
Labels
🛠️ Feature 🛠️ 기능 구현 ♻️ Refactor ♻️ 전반적인 코드 리팩토링
Milestone

Comments

@Stilllee
Copy link
Contributor

Stilllee commented Jan 22, 2025

📄 Description

프로필수정 페이지의 코드를 정리하고 개선사항을 반영하는 리팩토링을 진행합니다.

✅ TODO

  • 수정 완료시 모달 알림창 띄우기
  • 프로필업로드 IndexedDB 사용 방식으로 교체
  • 코드 정리
  • fetch 모듈 함수 수정 (토큰 직접 주입 -> credential: 'include'로 변경)
  • EditProfilForm, useEditProfile의 토큰 관련 로직 수정
  • 테스트 코드 작성

🎸 ETC

  • 프로필 수정 후 '유저페이지'의 프로필 정보 바로 업데이트되지 않는 이슈 발생
@Stilllee Stilllee added ♻️ Refactor ♻️ 전반적인 코드 리팩토링 🛠️ Feature 🛠️ 기능 구현 labels Jan 22, 2025
@Stilllee Stilllee added this to the Week4 milestone Jan 22, 2025
@Stilllee Stilllee self-assigned this Jan 22, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Jan 23, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 4, 2025
- useGetProfile 훅에서 토큰 파라미터 제거
- useEditProfile 훅의 토큰 관련 로직 정리
- 프로필 조회 시 토큰 검증 불필요
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 4, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 4, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 4, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 4, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 4, 2025
- ProfileImageInput 컴포넌트의 이미지 관리 훅 교체
- IndexedDB 저장소 추가로 새로고침 시에도 이미지 유지
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 4, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 6, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 6, 2025
- 프리뷰 아이콘 컨테이너를 button으로 변경
- 카메라 아이콘 클릭시 발생하는 이벤트 버블링 해결
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 6, 2025
- 프로필 이미지 렌더링 테스트
- 호버 상태에서 삭제 아이콘 표시/숨김 테스트
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 7, 2025
- 이미지와 카메라 아이콘의 hover 효과를 통합
- 두 영역을 하나의 컴포넌트처럼 동작하도록 수정
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 7, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 7, 2025
- 기능 단위 테스트 그룹을 상태 기반으로 재구성
- 이미지 선택 전/후 상태에 따른 테스트 케이스 분리
- 선택 후 상태 테스트 케이스 임시 주석 처리
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 7, 2025
- 이미지 업로드 및 프리뷰 관련 테스트 케이스 추가
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 7, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 7, 2025
- EditProfileForm에서 태그 관련 로직을 분리
- useCallback을 사용하여 태그 변경 시 발생하는 무한 요청 방지
- 태그 입력 시 유효성 검사 및 에러 처리 로직 개선
- error.tsx에 맞게 에러 처리 수정
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 7, 2025
- 프로필 로딩 UI 수정
- 폼 초기값 설정 로직 개선
- 폼 데이터 동기화를 위한 useEffect 추가
- 불필요한 api 호출 최소화
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 8, 2025
- 프로필 수정 후 유저 페이지 이동 시 최신 데이터가 표시되지 않는 문제 수정
- router.replace 완료 후 router.refresh를 순차적으로 실행하도록 변경
- async/await를 사용하여 비동기 처리 로직 개선
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 8, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 8, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 9, 2025
- 빌드 시점에 사전 렌더링하지 않고, 요청 시점에 동적으로 렌더링하게 설정
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
- mounted 상태 체크로 초기 렌더링 일치시킴
- 서버와 클라이언트의 초기 렌더링 동기화
- 사용자 상태에 따른 UI 불일치 해결
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
- 초기 빈 값으로 controlled input 상태 유지
- userInfo 로드 시 폼 값 업데이트
- userInfo 변경 시 폼 업데이트 동작 유지
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
- 아이콘 사이즈 수정
- p태그 스타일 수정
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
Stilllee added a commit to Stilllee/mogua-fe that referenced this issue Feb 12, 2025
- 헤더 프로필 이미지에 드롭다운 연결
- 프로필수정페이지에서 로그아웃/탈퇴하기 삭제
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ Feature 🛠️ 기능 구현 ♻️ Refactor ♻️ 전반적인 코드 리팩토링
Projects
None yet
Development

No branches or pull requests

1 participant