2021-01-14 00:43:35 +01:00
|
|
|
import { HeaderCenter, HeaderLeft } from '@components/Header'
|
2021-01-30 01:29:15 +01:00
|
|
|
import ScreenMeBookmarks from '@screens/Tabs/Me/Bookmarks'
|
|
|
|
import ScreenMeConversations from '@screens/Tabs/Me/Cconversations'
|
|
|
|
import ScreenMeFavourites from '@screens/Tabs/Me/Favourites'
|
|
|
|
import ScreenMeLists from '@screens/Tabs/Me/Lists'
|
|
|
|
import ScreenMeRoot from '@screens/Tabs/Me/Root'
|
|
|
|
import ScreenMeListsList from '@screens/Tabs/Me/Root/Lists/List'
|
|
|
|
import ScreenMeSettings from '@screens/Tabs/Me/Settings'
|
|
|
|
import ScreenMeSwitch from '@screens/Tabs/Me/Switch'
|
|
|
|
import sharedScreens from '@screens/Tabs/Shared/sharedScreens'
|
2021-01-07 22:18:14 +01:00
|
|
|
import React from 'react'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
2021-01-14 00:43:35 +01:00
|
|
|
import { Platform } from 'react-native'
|
2021-01-07 22:18:14 +01:00
|
|
|
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
|
2021-02-27 16:33:54 +01:00
|
|
|
import ScreenMeSettingsPush from './Me/Push'
|
2020-11-28 17:07:30 +01:00
|
|
|
|
2021-01-30 01:29:15 +01:00
|
|
|
const Stack = createNativeStackNavigator<Nav.TabMeStackParamList>()
|
2020-11-21 13:19:05 +01:00
|
|
|
|
2021-02-08 23:19:55 +01:00
|
|
|
const TabMe = React.memo(
|
|
|
|
() => {
|
|
|
|
const { t } = useTranslation()
|
2020-11-24 00:18:47 +01:00
|
|
|
|
2021-02-08 23:19:55 +01:00
|
|
|
return (
|
|
|
|
<Stack.Navigator
|
|
|
|
screenOptions={{ headerHideShadow: true, headerTopInsetEnabled: false }}
|
|
|
|
>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Root'
|
|
|
|
component={ScreenMeRoot}
|
|
|
|
options={{
|
|
|
|
headerTranslucent: true,
|
|
|
|
headerStyle: { backgroundColor: 'rgba(255, 255, 255, 0)' },
|
|
|
|
headerCenter: () => null
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Bookmarks'
|
|
|
|
component={ScreenMeBookmarks}
|
|
|
|
options={({ navigation }: any) => ({
|
|
|
|
headerTitle: t('meBookmarks:heading'),
|
|
|
|
...(Platform.OS === 'android' && {
|
|
|
|
headerCenter: () => (
|
|
|
|
<HeaderCenter content={t('meBookmarks:heading')} />
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
headerLeft: () => <HeaderLeft onPress={() => navigation.pop(1)} />
|
|
|
|
})}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Conversations'
|
|
|
|
component={ScreenMeConversations}
|
|
|
|
options={({ navigation }: any) => ({
|
|
|
|
headerTitle: t('meConversations:heading'),
|
|
|
|
...(Platform.OS === 'android' && {
|
|
|
|
headerCenter: () => (
|
|
|
|
<HeaderCenter content={t('meConversations:heading')} />
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
headerLeft: () => <HeaderLeft onPress={() => navigation.pop(1)} />
|
|
|
|
})}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Favourites'
|
|
|
|
component={ScreenMeFavourites}
|
|
|
|
options={({ navigation }: any) => ({
|
|
|
|
headerTitle: t('meFavourites:heading'),
|
|
|
|
...(Platform.OS === 'android' && {
|
|
|
|
headerCenter: () => (
|
|
|
|
<HeaderCenter content={t('meFavourites:heading')} />
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
headerLeft: () => <HeaderLeft onPress={() => navigation.pop(1)} />
|
|
|
|
})}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Lists'
|
|
|
|
component={ScreenMeLists}
|
|
|
|
options={({ navigation }: any) => ({
|
|
|
|
headerTitle: t('meLists:heading'),
|
|
|
|
...(Platform.OS === 'android' && {
|
|
|
|
headerCenter: () => (
|
|
|
|
<HeaderCenter content={t('meLists:heading')} />
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
headerLeft: () => <HeaderLeft onPress={() => navigation.pop(1)} />
|
|
|
|
})}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Lists-List'
|
|
|
|
component={ScreenMeListsList}
|
|
|
|
options={({ route, navigation }: any) => ({
|
|
|
|
headerTitle: t('meListsList:heading', { list: route.params.title }),
|
|
|
|
...(Platform.OS === 'android' && {
|
|
|
|
headerCenter: () => (
|
|
|
|
<HeaderCenter
|
|
|
|
content={t('meListsList:heading', {
|
|
|
|
list: route.params.title
|
|
|
|
})}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
headerLeft: () => <HeaderLeft onPress={() => navigation.pop(1)} />
|
|
|
|
})}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Settings'
|
|
|
|
component={ScreenMeSettings}
|
|
|
|
options={({ navigation }: any) => ({
|
|
|
|
headerTitle: t('meSettings:heading'),
|
|
|
|
...(Platform.OS === 'android' && {
|
|
|
|
headerCenter: () => (
|
|
|
|
<HeaderCenter content={t('meSettings:heading')} />
|
|
|
|
)
|
|
|
|
}),
|
|
|
|
headerLeft: () => <HeaderLeft onPress={() => navigation.pop(1)} />
|
|
|
|
})}
|
|
|
|
/>
|
2021-02-20 19:12:44 +01:00
|
|
|
<Stack.Screen
|
2021-02-27 16:33:54 +01:00
|
|
|
name='Tab-Me-Settings-Push'
|
|
|
|
component={ScreenMeSettingsPush}
|
2021-02-20 19:12:44 +01:00
|
|
|
options={({ navigation }: any) => ({
|
2021-02-27 16:33:54 +01:00
|
|
|
headerTitle: t('meSettingsPush:heading'),
|
2021-02-20 19:12:44 +01:00
|
|
|
...(Platform.OS === 'android' && {
|
|
|
|
headerCenter: () => (
|
2021-02-27 16:33:54 +01:00
|
|
|
<HeaderCenter content={t('meSettingsPush:heading')} />
|
2021-02-20 19:12:44 +01:00
|
|
|
)
|
|
|
|
}),
|
|
|
|
headerLeft: () => <HeaderLeft onPress={() => navigation.pop(1)} />
|
|
|
|
})}
|
|
|
|
/>
|
2021-02-08 23:19:55 +01:00
|
|
|
<Stack.Screen
|
|
|
|
name='Tab-Me-Switch'
|
|
|
|
component={ScreenMeSwitch}
|
2021-02-13 13:08:34 +01:00
|
|
|
options={{
|
2021-02-08 23:19:55 +01:00
|
|
|
stackPresentation: 'modal',
|
2021-02-13 13:08:34 +01:00
|
|
|
headerShown: false
|
|
|
|
}}
|
2021-02-08 23:19:55 +01:00
|
|
|
/>
|
2020-11-21 13:19:05 +01:00
|
|
|
|
2021-02-08 23:19:55 +01:00
|
|
|
{sharedScreens(Stack as any)}
|
|
|
|
</Stack.Navigator>
|
|
|
|
)
|
|
|
|
},
|
|
|
|
() => true
|
|
|
|
)
|
2020-11-21 13:19:05 +01:00
|
|
|
|
2021-01-30 01:29:15 +01:00
|
|
|
export default TabMe
|