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

Fix modals

This commit is contained in:
Zhiyuan Zheng
2021-05-12 22:45:51 +02:00
parent 8e0d499ed8
commit 87343989cf
14 changed files with 361 additions and 442 deletions

View File

@ -1,3 +1,4 @@
import { HeaderCenter, HeaderLeft } from '@components/Header'
import { displayMessage, Message, removeMessage } from '@components/Message'
import navigationRef from '@helpers/navigationRef'
import { useNetInfo } from '@react-native-community/netinfo'
@ -171,18 +172,30 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
<Stack.Screen
name='Screen-Announcements'
component={ScreenAnnouncements}
options={{
options={({ navigation }) => ({
stackPresentation: 'transparentModal',
stackAnimation: 'fade',
headerShown: false
}}
headerShown: true,
headerHideShadow: true,
headerTopInsetEnabled: false,
headerStyle: { backgroundColor: 'transparent' },
headerLeft: () => (
<HeaderLeft content='X' onPress={() => navigation.goBack()} />
),
headerTitle: t('screenAnnouncements:heading'),
...(Platform.OS === 'android' && {
headerCenter: () => (
<HeaderCenter content={t('screenAnnouncements:heading')} />
)
})
})}
/>
<Stack.Screen
name='Screen-Compose'
component={ScreenCompose}
options={{
stackPresentation: 'fullScreenModal',
headerShown: false
...(Platform.OS === 'android' && { headerShown: false })
}}
/>
<Stack.Screen
@ -191,7 +204,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
options={{
stackPresentation: 'fullScreenModal',
stackAnimation: 'fade',
headerShown: false
...(Platform.OS === 'android' && { headerShown: false })
}}
/>
</Stack.Navigator>