Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pvinis committed Feb 22, 2020
1 parent e448290 commit 10d9755
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/useKeyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,18 @@ export default function useKeyboard() {
}

useEffect(() => {
Keyboard.addListener('keyboardWillShow', handleKeyboardWillShow);
Keyboard.addListener('keyboardDidShow', handleKeyboardDidShow);
Keyboard.addListener('keyboardWillHide', handleKeyboardWillHide);
Keyboard.addListener('keyboardDidHide', handleKeyboardDidHide);
Keyboard.addListener('keyboardWillShow', handleKeyboardWillShow)
Keyboard.addListener('keyboardDidShow', handleKeyboardDidShow)
Keyboard.addListener('keyboardWillHide', handleKeyboardWillHide)
Keyboard.addListener('keyboardDidHide', handleKeyboardDidHide)

return () => {
Keyboard.removeListener('keyboardWillShow', handleKeyboardWillShow);
Keyboard.removeListener('keyboardDidShow', handleKeyboardDidShow);
Keyboard.removeListener('keyboardWillHide', handleKeyboardWillHide);
Keyboard.removeListener('keyboardDidHide', handleKeyboardDidHide);
};
}, []);

Keyboard.removeListener('keyboardWillShow', handleKeyboardWillShow)
Keyboard.removeListener('keyboardDidShow', handleKeyboardDidShow)
Keyboard.removeListener('keyboardWillHide', handleKeyboardWillHide)
Keyboard.removeListener('keyboardDidHide', handleKeyboardDidHide)
}
}, [])

return {
keyboardShown: shown,
Expand Down

0 comments on commit 10d9755

Please sign in to comment.