2020-11-21 13:19:05 +01:00
|
|
|
import React from 'react'
|
|
|
|
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
|
2020-11-29 13:11:23 +01:00
|
|
|
import { useTranslation } from 'react-i18next'
|
2020-11-21 13:19:05 +01:00
|
|
|
|
2020-12-13 14:04:25 +01:00
|
|
|
import ScreenMeRoot from '@screens/Me/Root'
|
|
|
|
import ScreenMeConversations from '@screens/Me/Cconversations'
|
|
|
|
import ScreenMeBookmarks from '@screens/Me/Bookmarks'
|
|
|
|
import ScreenMeFavourites from '@screens/Me/Favourites'
|
|
|
|
import ScreenMeLists from '@screens/Me/Lists'
|
|
|
|
import sharedScreens from '@screens/Shared/sharedScreens'
|
|
|
|
import ScreenMeListsList from '@screens/Me/Root/Lists/List'
|
|
|
|
import ScreenMeSettings from '@screens/Me/Settings'
|
2020-11-28 17:07:30 +01:00
|
|
|
|
2020-12-13 23:38:37 +01:00
|
|
|
import { HeaderLeft } from '@root/components/Header'
|
2020-11-21 13:19:05 +01:00
|
|
|
|
|
|
|
const Stack = createNativeStackNavigator()
|
|
|
|
|
|
|
|
const ScreenMe: React.FC = () => {
|
2020-11-29 13:11:23 +01:00
|
|
|
const { t } = useTranslation()
|
2020-11-24 00:18:47 +01:00
|
|
|
|
2020-11-21 13:19:05 +01:00
|
|
|
return (
|
2020-11-24 00:18:47 +01:00
|
|
|
<Stack.Navigator>
|
2020-11-22 00:46:23 +01:00
|
|
|
<Stack.Screen
|
|
|
|
name='Screen-Me-Root'
|
|
|
|
component={ScreenMeRoot}
|
2020-12-13 23:38:37 +01:00
|
|
|
options={{
|
|
|
|
headerTranslucent: true,
|
|
|
|
headerStyle: { backgroundColor: 'rgba(255, 255, 255, 0)' },
|
|
|
|
headerCenter: () => null
|
|
|
|
}}
|
2020-11-22 00:46:23 +01:00
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Screen-Me-Conversations'
|
|
|
|
component={ScreenMeConversations}
|
2020-12-14 22:33:19 +01:00
|
|
|
options={({ navigation }: any) => ({
|
2020-12-13 23:38:37 +01:00
|
|
|
headerTitle: t('meConversations:heading'),
|
|
|
|
headerLeft: () => (
|
|
|
|
<HeaderLeft
|
|
|
|
icon='chevron-left'
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
/>
|
|
|
|
)
|
2020-12-14 22:33:19 +01:00
|
|
|
})}
|
2020-11-22 00:46:23 +01:00
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Screen-Me-Bookmarks'
|
|
|
|
component={ScreenMeBookmarks}
|
2020-12-14 22:33:19 +01:00
|
|
|
options={({ navigation }: any) => ({
|
2020-12-13 23:38:37 +01:00
|
|
|
headerTitle: t('meBookmarks:heading'),
|
|
|
|
headerLeft: () => (
|
|
|
|
<HeaderLeft
|
|
|
|
icon='chevron-left'
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
/>
|
|
|
|
)
|
2020-12-14 22:33:19 +01:00
|
|
|
})}
|
2020-11-22 00:46:23 +01:00
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Screen-Me-Favourites'
|
|
|
|
component={ScreenMeFavourites}
|
2020-12-14 22:33:19 +01:00
|
|
|
options={({ navigation }: any) => ({
|
2020-12-13 23:38:37 +01:00
|
|
|
headerTitle: t('meFavourites:heading'),
|
|
|
|
headerLeft: () => (
|
|
|
|
<HeaderLeft
|
|
|
|
icon='chevron-left'
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
/>
|
|
|
|
)
|
2020-12-14 22:33:19 +01:00
|
|
|
})}
|
2020-11-22 00:46:23 +01:00
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Screen-Me-Lists'
|
|
|
|
component={ScreenMeLists}
|
2020-12-14 22:33:19 +01:00
|
|
|
options={({ navigation }: any) => ({
|
2020-12-13 23:38:37 +01:00
|
|
|
headerTitle: t('meLists:heading'),
|
|
|
|
headerLeft: () => (
|
|
|
|
<HeaderLeft
|
|
|
|
icon='chevron-left'
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
/>
|
|
|
|
)
|
2020-12-14 22:33:19 +01:00
|
|
|
})}
|
2020-11-22 00:46:23 +01:00
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Screen-Me-Lists-List'
|
|
|
|
component={ScreenMeListsList}
|
2020-12-14 22:33:19 +01:00
|
|
|
options={({ route, navigation }: any) => ({
|
2020-12-13 23:38:37 +01:00
|
|
|
headerTitle: t('meListsList:heading', { list: route.params.title }),
|
|
|
|
headerLeft: () => (
|
|
|
|
<HeaderLeft
|
|
|
|
icon='chevron-left'
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
/>
|
|
|
|
)
|
2020-11-28 17:07:30 +01:00
|
|
|
})}
|
|
|
|
/>
|
|
|
|
<Stack.Screen
|
|
|
|
name='Screen-Me-Settings'
|
|
|
|
component={ScreenMeSettings}
|
2020-12-14 22:33:19 +01:00
|
|
|
options={({ navigation }: any) => ({
|
2020-12-13 23:38:37 +01:00
|
|
|
headerTitle: t('meSettings:heading'),
|
|
|
|
headerLeft: () => (
|
|
|
|
<HeaderLeft
|
|
|
|
icon='chevron-left'
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
/>
|
|
|
|
)
|
2020-12-14 22:33:19 +01:00
|
|
|
})}
|
2020-11-22 00:46:23 +01:00
|
|
|
/>
|
2020-11-21 13:19:05 +01:00
|
|
|
|
|
|
|
{sharedScreens(Stack)}
|
|
|
|
</Stack.Navigator>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ScreenMe
|