Skip to content

Commit

Permalink
Fix(modify-sinitto-info): 본인 정보 수정 API 타입 관련 오류 타입 단언으로 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
Diwoni committed Oct 17, 2024
1 parent d4c2d11 commit 529d616
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ const SinittoProfileBox = ({ isEditing, setIsEditing }: Props) => {
}, [isEditing, data]);

const handleSaveClick = () => {
modifySinittoInfoMutation.mutate(
{ ...data, name, phoneNumber },
{
onSuccess: () => {
setIsEditing(false);
refetch();
},
}
);
const modifiedSinittoInfo = {
name: name,
phoneNumber: phoneNumber,
email: data?.email as string,
accountNumber: data?.accountNumber as string,
bankName: data?.bankName as string,
};
modifySinittoInfoMutation.mutate(modifiedSinittoInfo, {
onSuccess: () => {
setIsEditing(false);
refetch();
},
});
};

if (isLoading) return <div>로딩 중...</div>;
Expand Down

0 comments on commit 529d616

Please sign in to comment.