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) => {