-
Notifications
You must be signed in to change notification settings - Fork 0
feat: create profile-update #111
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
base: develop
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| <label className="inline-block text-small font-md text-slate-30 leading-5 tracking-[-0.14px] mr-1"> | ||
| 내용 | ||
| </label> | ||
| <STooltip>hello</STooltip> |
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.
현재 피그마에서 툴팁 내용이 없어서, 혜린님과 이야기 한 이후에 추가 하도록 하겠습니다.
| const handleSubmitClick = () => { | ||
| formMethods.handleSubmit( | ||
| (formValues) => { | ||
| const parsed = transformDates(formValues as ProfileUpdateRequest); | ||
| updateProfile(parsed); | ||
| }, |
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.
update하고 invalidQuery로 query 초기화가 필요할 것 같아요.
업데이트 된 내용이 profile로 이동하면 반영이 캐싱때문에 안되는 것 같아요
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.
[HELP]
invalidQuery 로 했다가 데이터 반영이 안된다고해서,
const freshData = await queryClient.fetchQuery({ queryKey, queryFn });
formMethods.reset(freshData);
이렇게 해서 대신 데이터 반영하게 만들었는데, 이걸 말씀하신게 아닌가요?
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.
엇 invalidQuery 말씀드린건데 저도 해볼게요
|
윤근님 추가적인 문제가 2개가 있는데요
확인해보니, EducationForm에서 DEFAULT_EDUCATION되었다가 값이 채워졌다가 계속 반복되면서 sidebar useEffect에서 무한렌더링이 발생하네요 |
|
프로필 보는데서 career total이 0으로 나오네요 BE 확인이 필요할 것 같아요 |
|
|
||
| const ProfileUpdateSidebar = ({ handleSubmitClick }: ProfileUpdateSidebarProps) => { | ||
| const { control } = useFormContext(); | ||
| const [requiredFields, setRequiredFields] = useState(false); |
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.
여기 버튼 disable 처리와 zod에서 잡는 거랑 조금 달라서, 버튼은 enable 되지만 실제로는 저장이 zod에서 disable하고 있어요.
필수적이지 않은 애들은 초기에 잡은 값 타입(ex. null -> nullable)을 처리해주는 게 어떨까요
zod와 버튼 disable 상태를 맞춰야할 것 같아요
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.
[HELP]
필수적이지 않는값에만 z.string().nullable(); 이렇게 해주자는 말씀이실까요?
지금 zod랑 disable 쪽 미스매칭때문에 코멘트 남겨주신것 같은데,
버튼 enable 되어서 누를경우에만 zod에서 설정한 메시지를 보여줄수 있는거 아닌가요?
ex) 닉네임 { message: '닉네임은 필수입니다' }
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.
아~ 이건 얘기가 좀 필요할 것 같은데요
- 윤근님 말씀대로 허용한 후에 메세지 띄운다.
- 버튼 enable과 zod validation을 맞춘다
저는 2번으로 생각을 해서 프로젝트 등록 쪽에서 수작업으로 맞췄는데(자동화X)
ex) const result = profileSchema.safeParse(mockData);
이렇게 할 수도 있겠네요
근데 프로필 업데이트는 특성상 1번이 나을 수도 있겠네요
| const handleSubmitClick = () => { | ||
| formMethods.handleSubmit( | ||
| (formValues) => { | ||
| const parsed = transformDates(formValues as ProfileUpdateRequest); | ||
| updateProfile(parsed); | ||
| }, |
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.
요건 아직 적용 전이시져?
|
ㄷㄷ 한번에 잘해드려야되는데 번거롭게 체크하게 만들어서 죄송해요. |
|
#111 (comment) |
No description provided.