Small cleanup of parseInt

This commit is contained in:
Justin Edmund 2023-07-03 21:24:32 -07:00
parent a1c22acaaf
commit 88b795cbd3

View file

@ -125,11 +125,9 @@ const AwakeningSelectWithInput = ({
const input = inputRef.current
if (input && !handleInputError(parseFloat(input.value))) return
setCurrentLevel(parseInt(event.target.value))
sendValues(
currentAwakening ? currentAwakening.id : '0',
parseInt(event.target.value)
)
const newLevel = parseInt(event.target.value)
setCurrentLevel(newLevel)
sendValues(currentAwakening ? currentAwakening.id : '0', newLevel)
}
// Methods: Handle error