From f011ea77c92f1c4f9d7d8a9ad8e55b562e188ff1 Mon Sep 17 00:00:00 2001 From: thisishwarang <101498590+thisishwarang@users.noreply.github.com> Date: Tue, 24 Sep 2024 13:28:54 +0900 Subject: [PATCH] =?UTF-8?q?[Fix/#37]=20=EB=92=A4=EB=A1=9C=EA=B0=80?= =?UTF-8?q?=EA=B8=B0=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20=EC=A3=BC=EC=86=8C?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EA=B0=80=EC=A0=B8=EC=98=A4=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95=20(#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/steps/Receiver2/Receiver2.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pages/orderInfo/components/steps/Receiver2/Receiver2.tsx b/src/pages/orderInfo/components/steps/Receiver2/Receiver2.tsx index f537839..9a039eb 100644 --- a/src/pages/orderInfo/components/steps/Receiver2/Receiver2.tsx +++ b/src/pages/orderInfo/components/steps/Receiver2/Receiver2.tsx @@ -24,13 +24,17 @@ interface DaumPostcodeData { } const Receiver2 = ({ onNext }: StepProps) => { - const { currentRecipientIndex, handleRecipientInputChange } = - useOrderPostDataChange(); + const { + orderPostDataState, + currentRecipientIndex, + handleRecipientInputChange, + } = useOrderPostDataChange(); + const receiver = orderPostDataState.recipientInfo[currentRecipientIndex]; const [form, setForm] = useState({ - address: "", - addressDetail: "", - zonecode: "", + address: receiver?.recipientAddress || "", + addressDetail: receiver?.recipientAddressDetail || "", + zonecode: receiver?.recipientPostCode || "", }); const open = useDaumPostcodePopup(scriptUrl);