From 529d616a355258a5f88de9c317b0f93b6905df20 Mon Sep 17 00:00:00 2001 From: diwoni <70441308+Diwoni@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:04:10 +0900 Subject: [PATCH] =?UTF-8?q?Fix(modify-sinitto-info):=20=EB=B3=B8=EC=9D=B8?= =?UTF-8?q?=20=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95=20API=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20=EA=B4=80=EB=A0=A8=20=EC=98=A4=EB=A5=98=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20=EB=8B=A8=EC=96=B8=EC=9C=BC=EB=A1=9C=20=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile-box/SinittoProfileBox.tsx | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/pages/sinitto/mypage/components/profile-box/SinittoProfileBox.tsx b/src/pages/sinitto/mypage/components/profile-box/SinittoProfileBox.tsx index 053c7f57..d40e3fdf 100644 --- a/src/pages/sinitto/mypage/components/profile-box/SinittoProfileBox.tsx +++ b/src/pages/sinitto/mypage/components/profile-box/SinittoProfileBox.tsx @@ -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