1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix back button

Using customized component, need to get `navigation` from props instead of hooks
This commit is contained in:
Zhiyuan Zheng
2020-12-14 22:33:19 +01:00
parent 991741488d
commit 177afe1dd1
19 changed files with 98 additions and 80 deletions

View File

@ -19,7 +19,6 @@ import {
} from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
import { useNavigation } from '@react-navigation/native'
import sha256 from 'crypto-js/sha256'
import { store } from '@root/store'
@ -308,10 +307,10 @@ export interface Props {
}
| undefined
}
navigation: any
}
const Compose: React.FC<Props> = ({ route: { params } }) => {
const navigation = useNavigation()
const Compose: React.FC<Props> = ({ route: { params }, navigation }) => {
const { theme } = useTheme()
const [hasKeyboard, setHasKeyboard] = useState(false)