Skip to content

Commit

Permalink
[Fix/#37] 뒤로가기 클릭시 주소정보 가져오도록 수정 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisishwarang authored Sep 24, 2024
1 parent 43574f8 commit f011ea7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/pages/orderInfo/components/steps/Receiver2/Receiver2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f011ea7

Please sign in to comment.