Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Oct 19, 2023
1 parent 9d7a46d commit afe784d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/swapv2/LimitOrder/LimitOrderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const LimitOrderForm = forwardRef<LimitOrderFormHandle, Props>(function LimitOrd
removeOrderNeedCreated,
resetState,
setOrderEditing,
setInputValue,
setInputValue: setInputValueGlobal,
} = useLimitActionHandlers()
const { ordersNeedCreated, inputAmount: inputAmountGlobal } = useLimitState()

Expand Down Expand Up @@ -535,9 +535,9 @@ const LimitOrderForm = forwardRef<LimitOrderFormHandle, Props>(function LimitOrd
useEffect(() => {
if (inputAmountGlobal) {
onSetInput(inputAmountGlobal)
setInputValue('')
setInputValueGlobal('')
}
}, [inputAmountGlobal, onSetInput, setInputValue]) // when redux state change, ex: type and swap
}, [inputAmountGlobal, onSetInput, setInputValueGlobal]) // when redux state change, ex: type and swap

useEffect(() => {
return () => {
Expand Down

0 comments on commit afe784d

Please sign in to comment.