From ff4294ddba3e22a98dfaf07ada33868af844d7f1 Mon Sep 17 00:00:00 2001 From: yeonseong Date: Sat, 30 Nov 2024 17:57:19 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B0=98=EB=82=A9=EC=8B=9C=20condition?= =?UTF-8?q?=EC=9D=B4=20=EC=95=88=20=EB=93=A4=EC=96=B4=EA=B0=80=EB=8A=94=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/return/ReturnModalContents.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/component/return/ReturnModalContents.tsx b/src/component/return/ReturnModalContents.tsx index 3b5f64e3..256e1649 100644 --- a/src/component/return/ReturnModalContents.tsx +++ b/src/component/return/ReturnModalContents.tsx @@ -17,14 +17,15 @@ const ReturnModalContents = ({ lendingId, closeModal }: Props) => { const [isReturnable, setIsReturnable] = useState(false); const conditionRef = useRef(''); - const { requestReturn } = usePatchLendingsReturn({ + const { condition, setCondition, requestReturn } = usePatchLendingsReturn({ lendingId, title: lendingData?.title || "", closeModal, }); - const setCondition = useCallback((value: string) => { + const setConditionRef = useCallback((value: string) => { conditionRef.current = value; + setCondition(value); setIsReturnable(conditionRef.current.length > 0); }, [], @@ -61,7 +62,7 @@ const ReturnModalContents = ({ lendingId, closeModal }: Props) => {