Skip to content

feat: 마이페이지 개발#59

Merged
jungwon123 merged 3 commits into
mainfrom
feat/profile
Feb 21, 2026
Merged

feat: 마이페이지 개발#59
jungwon123 merged 3 commits into
mainfrom
feat/profile

Conversation

@jungwon123

Copy link
Copy Markdown
Contributor

Summary

마이페이지 UI와 API 개발완료입니다.

Get /{teamId}/user 프로필 조회
Patch /{teamId}/user 프로필 이름 수정, 변경사항 저장하기
Delete /{teamId}/user 회원탈퇴
/{teamId}/user/password 비밀번호 변경
/{teamId}/images/upload 프로필 이미지 변경

Issue

#58

@jungwon123 jungwon123 added this to the 페이지 milestone Feb 19, 2026
@jungwon123 jungwon123 added the 기능추가 기능개발 및 추가할 때 사용해주세요. label Feb 19, 2026
@github-project-automation github-project-automation Bot moved this to 개발 대기중 in workers Feb 19, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jungwon123, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자가 자신의 계정 정보를 관리할 수 있는 마이페이지 기능을 도입합니다. 사용자 프로필 조회 및 편집, 비밀번호 변경, 프로필 이미지 업로드, 그리고 회원 탈퇴와 같은 핵심 기능들을 포함하며, 사용자 경험을 개선하기 위한 UI와 필요한 백엔드 API 연동이 모두 구현되었습니다. 다양한 기기에서 일관된 사용성을 제공하기 위해 반응형 디자인 원칙이 적용되었습니다.

Highlights

  • 마이페이지 UI 개발: 사용자가 자신의 프로필 정보를 확인하고 수정할 수 있는 마이페이지 사용자 인터페이스가 개발되었습니다.
  • 마이페이지 API 연동: 프로필 조회, 이름 수정, 회원 탈퇴, 비밀번호 변경, 프로필 이미지 변경 등 마이페이지 관련 API가 구현 및 연동되었습니다.
  • 사용자 정보 관리 훅 구현: 사용자 정보 조회, 수정, 삭제 및 비밀번호 변경, 이미지 업로드 기능을 통합 관리하는 useUser 커스텀 훅이 추가되었습니다.
  • 반응형 디자인 적용: 마이페이지 레이아웃에 모바일, 태블릿, 데스크탑 환경에 최적화된 반응형 스타일이 적용되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/app/(root)/mypage/hooks/index.ts
    • useUser 훅을 내보내도록 업데이트되었습니다.
  • src/app/(root)/mypage/hooks/useUser.ts
    • 사용자 정보 조회, 수정, 삭제, 비밀번호 변경, 프로필 이미지 업로드 기능을 포함하는 useUser 커스텀 훅이 추가되었습니다.
  • src/app/(root)/mypage/page.module.css
    • 마이페이지 레이아웃 및 반응형 디자인을 위한 CSS 모듈이 추가되었습니다.
  • src/app/(root)/mypage/page.tsx
    • 마이페이지의 메인 컴포넌트가 추가되었으며, 사용자 프로필 표시, 수정 폼, 비밀번호 변경 및 회원 탈퇴 기능이 구현되었습니다.
  • src/components/sidebar/styles/Sidebar.module.css
    • 사이드바의 모바일 미디어 쿼리 최대 너비가 767px에서 375px로 조정되었습니다.
  • src/shared/apis/user/index.ts
    • 사용자 API 관련 타입과 함수를 내보내도록 업데이트되었습니다.
  • src/shared/apis/user/types.ts
    • 사용자 정보, 그룹, 멤버십, API 요청 및 응답을 위한 타입 정의가 추가되었습니다.
  • src/shared/apis/user/userApi.ts
    • 사용자 정보 조회, 수정, 삭제, 비밀번호 변경, 이미지 업로드 기능을 위한 API 클라이언트 함수가 추가되었습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces a new Mypage feature, including UI components, API integrations, and a custom hook for user management. The changes are well-structured, separating concerns into API services, types, and a custom React hook. The CSS styling for the Mypage is also added, with responsive adjustments for different screen sizes. Overall, the code is clean and follows modern React practices. However, there are a few areas for improvement regarding error handling consistency, dependency array completeness in useCallback, and potential re-fetching issues. The CSS media queries also have a minor logical inconsistency that could lead to unexpected behavior on certain tablet sizes.

setError('프로필 수정에 실패했습니다.');
return { success: false };
}
}, [name, profileImage]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The updateProfile useCallback hook is missing user?.image in its dependency array. If user.image changes (e.g., after an image upload), hasChanges might not re-evaluate correctly, leading to stale state or incorrect UI behavior regarding unsaved changes.

Suggested change
}, [name, profileImage]);
}, [name, profileImage, user?.image]);

Comment on lines +131 to +143
@media (max-width: 767px) {
.layout {
flex-direction: row;
}

.main {
padding: 32px 24px;
}

.card {
max-width: 100%;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The media query for max-width: 767px sets flex-direction: row for .layout, which conflicts with the max-width: 375px query that sets flex-direction: column. This means for screen widths between 376px and 767px, the layout will be row (tablet landscape), but for screens smaller than 375px (mobile), it will be column. The intent for max-width: 767px seems to be for tablets, but it's overriding the mobile layout. Consider if flex-direction: row is truly desired for all screen sizes up to 767px, or if this rule should be more specific or removed if the default column from the base .layout is intended for smaller screens.

Suggested change
@media (max-width: 767px) {
.layout {
flex-direction: row;
}
.main {
padding: 32px 24px;
}
.card {
max-width: 100%;
}
}
/* 태블릿 (767px 이하) */
@media (max-width: 767px) {
.layout {
flex-direction: column; /* Or adjust as per design intent for tablets */
}
.main {
padding: 32px 24px;
}
.card {
max-width: 100%;
}
}

Comment on lines +241 to +244
if (result.success && result.url) {
setProfileImage(result.url);
setShowToast(true);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

After a successful image upload, setProfileImage(result.url) is called, but setShowToast(true) is also called immediately after. If the toast is meant to indicate that changes need to be saved, this might be misleading since the image has already been saved to the server. If the toast is for general success, it should probably be a different message or handled more explicitly after the updateProfile call, which would then save both name and image.

                  if (result.success && result.url) {
                    setProfileImage(result.url);
                    // Consider if a toast is needed here, or if it should be part of the overall save action.
                    // setShowToast(true);
                  }

Comment on lines +16 to +18
if (!response.ok) {
throw new Error('유저 정보를 불러오는데 실패했습니다.');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message "유저 정보를 불러오는데 실패했습니다." is hardcoded. It would be more robust to include the actual error message from the API response or provide more context to the user if possible. This would help in debugging and providing a better user experience.

Suggested change
if (!response.ok) {
throw new Error('유저 정보를 불러오는데 실패했습니다.');
}
if (!response.ok) {
const errorData = await response.json();
throw new Error(errorData.message || '유저 정보를 불러오는데 실패했습니다.');
}

Comment on lines +30 to +32
if (!response.ok) {
throw new Error('유저 정보 수정에 실패했습니다.');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to getUser, the error message for updateUser is hardcoded. Providing more specific error details from the API response would be beneficial for debugging and user feedback.

Suggested change
if (!response.ok) {
throw new Error('유저 정보 수정에 실패했습니다.');
}
if (!response.ok) {
const errorData = await response.json();
throw new Error(errorData.message || '유저 정보 수정에 실패했습니다.');
}

Comment on lines +43 to +45
if (!response.ok) {
throw new Error('회원 탈퇴에 실패했습니다.');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message for deleteUser is hardcoded. It would be better to extract the error message from the API response for more informative feedback.

  if (!response.ok) {
    const errorData = await response.json();
    throw new Error(errorData.message || '회원 탈퇴에 실패했습니다.');
  }

Comment on lines +56 to +58
throw new Error('비밀번호 변경에 실패했습니다.');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message for changePassword is hardcoded. Extracting the error message from the API response would provide more useful information.

  if (!response.ok) {
    const errorData = await response.json();
    throw new Error(errorData.message || '비밀번호 변경에 실패했습니다.');
  }

Comment on lines +72 to +74
if (!response.ok) {
throw new Error('이미지 업로드에 실패했습니다.');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message for uploadImage is hardcoded. It would be more helpful to include the actual error message from the API response.

  if (!response.ok) {
    const errorData = await response.json();
    throw new Error(errorData.message || '이미지 업로드에 실패했습니다.');
  }

@jungwon123 jungwon123 merged commit 3dcb5f9 into main Feb 21, 2026
1 check failed
@github-project-automation github-project-automation Bot moved this from 개발 대기중 to 개발 완료 in workers Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능추가 기능개발 및 추가할 때 사용해주세요.

Projects

Status: 개발 완료

Development

Successfully merging this pull request may close these issues.

4 participants