-
Notifications
You must be signed in to change notification settings - Fork 2
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
🎉 프로필 이미지와 닉네임 변경 컴포넌트 및 로직 #53
Conversation
@@ -0,0 +1,31 @@ | |||
'use client' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 내 물건 목록 페이지 이름을 my-item 이라고 했는데, mypage 라는 이름 자체가 고유해서 붙이신건가요?
디렉토리명은 케밥케이스(-)로 하기로 했는데 url에 영향을 주는 부분이라 저도 고민이 많네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
말씀하신대로 app 내부 폴더명은 url명이라 따로 생각하는게 좋을 것 같습니다. 저는 뭔가 고유하다는 인상을 받아서 저렇게 하긴 했습니다
const fileChangeHandler = async (file: File) => { | ||
setIsProfileChanged(true) | ||
try { | ||
const _data = await putUserProfile({ file: file }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아직 useMutation을 안 만드신건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그러고보니 usemutation 사용하면 좋겠네요! 감사합니다
setIsNicknameChanged(true) | ||
try { | ||
const _data = await putUserNickname(nickname) | ||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 안하긴 했지만, handleApiError를 사용 안하신 이유가 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아뇨! 해당 PR이 merge되기 전 dev에서 파서 작업한 내용이라 사용하지 못했습니다. 변경 예정입니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!!
스토리북에서 보니 생각보다 수정 아이콘들의 선두께나 색상이 너무 진한 것 같네요!
QA기간 때 제가 피그마도 수정하면서 이미지 파일 교체 해놓겠습니다!
const fileChangeHandler = async (file: File) => { | ||
setIsProfileChanged(true) | ||
try { | ||
const _data = await putUserProfile({ file: file }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 그동안 그냥 data로 했었는데 이렇게 trycatch문 내부에서만 사용되는 지역변수의 경우 _를 붙여서 구별해주는 디테일이 좋은 것 같네요! 좋은 코드 배워갑니다 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 근데 data 사용하게 되면 빼게 될 것 같아요
import { useAuth } from '@/contexts/AuthProvider' | ||
import { putUserNickname, putUserProfile } from '@/services/user/user' | ||
|
||
const UserInfo = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
프로필 이미지, 닉네임 모두 수정 성공했을 때, 성공했다는 토스트 메세지도 보이면 좋을 것 같네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다! 반영하겠습니다
} | ||
|
||
return ( | ||
<figure className="relative w-24 h-24"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 figure 태그는 처음 보는 것 같아요! 어떤 의미로 사용되는 것인가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이미지 등을 다루는 태그로 알고 있습니다
- 목적
관련 티켓 번호: 138, 139
- 주요 변경 사항
기타 사항 (선택)
- 스크린샷 (선택)