Skip to content

Commit d6bf70d

Browse files
committed
lint
1 parent 2966d50 commit d6bf70d

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/useKeyboard.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
import { useEffect, useState } from 'react'
2-
import { Keyboard, KeyboardEventListener, ScreenRect } from 'react-native'
1+
import {useEffect, useState} from 'react'
2+
import {Keyboard, KeyboardEventListener, ScreenRect} from 'react-native'
33

44
export default function useKeyboard() {
55
const [shown, setShown] = useState(false)
66
const [coordinates, setCoordinates] = useState<{
77
start: ScreenRect
88
end: ScreenRect
99
}>({
10-
start: { screenX: 0, screenY: 0, width: 0, height: 0 },
11-
end: { screenX: 0, screenY: 0, width: 0, height: 0 },
10+
start: {screenX: 0, screenY: 0, width: 0, height: 0},
11+
end: {screenX: 0, screenY: 0, width: 0, height: 0},
1212
})
1313
const [keyboardHeight, setKeyboardHeight] = useState<number>(0)
1414

1515
const handleKeyboardWillShow: KeyboardEventListener = e => {
16-
setCoordinates({ start: e.startCoordinates, end: e.endCoordinates })
16+
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
1717
}
1818
const handleKeyboardDidShow: KeyboardEventListener = e => {
1919
setShown(true)
20-
setCoordinates({ start: e.startCoordinates, end: e.endCoordinates })
20+
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
2121
setKeyboardHeight(e.endCoordinates.height)
2222
}
2323
const handleKeyboardWillHide: KeyboardEventListener = e => {
24-
setCoordinates({ start: e.startCoordinates, end: e.endCoordinates })
24+
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
2525
}
2626
const handleKeyboardDidHide: KeyboardEventListener = e => {
2727
setShown(false)
2828
if (e) {
29-
setCoordinates({ start: e.startCoordinates, end: e.endCoordinates })
29+
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
3030
} else {
3131
setCoordinates({
32-
start: { screenX: 0, screenY: 0, width: 0, height: 0 }
33-
, end: { screenX: 0, screenY: 0, width: 0, height: 0 }
34-
})
35-
}
32+
start: { screenX: 0, screenY: 0, width: 0, height: 0 }
33+
, end:{ screenX: 0, screenY: 0, width: 0, height: 0 }
34+
})
3635
setKeyboardHeight(0)
3736
}
3837

0 commit comments

Comments
 (0)