Fix problems with BottomSheet
and the report dialog (#3297)
* use @discord/bottom-sheet * add @types/invariant * some progress on keyboard dialog * rework rework add a comment use discord bottom sheet * remove `@gorhom/bottom-sheet` * remove android specific code * organize imports
This commit is contained in:
parent
c649ee1afa
commit
ad3dd9f6dc
11 changed files with 138 additions and 126 deletions
12
src/components/hooks/useOnKeyboard.ts
Normal file
12
src/components/hooks/useOnKeyboard.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from 'react'
|
||||
import {Keyboard} from 'react-native'
|
||||
|
||||
export function useOnKeyboardDidShow(cb: () => unknown) {
|
||||
React.useEffect(() => {
|
||||
const subscription = Keyboard.addListener('keyboardDidShow', cb)
|
||||
|
||||
return () => {
|
||||
subscription.remove()
|
||||
}
|
||||
}, [cb])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue