tooot/src/screens/Me.tsx

117 lines
3.3 KiB
TypeScript
Raw Normal View History

2020-11-21 13:19:05 +01:00
import React from 'react'
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
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 = () => {
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}
options={({ navigation }: any) => ({
2020-12-13 23:38:37 +01:00
headerTitle: t('meConversations:heading'),
headerLeft: () => (
<HeaderLeft
icon='chevron-left'
onPress={() => navigation.goBack()}
/>
)
})}
2020-11-22 00:46:23 +01:00
/>
<Stack.Screen
name='Screen-Me-Bookmarks'
component={ScreenMeBookmarks}
options={({ navigation }: any) => ({
2020-12-13 23:38:37 +01:00
headerTitle: t('meBookmarks:heading'),
headerLeft: () => (
<HeaderLeft
icon='chevron-left'
onPress={() => navigation.goBack()}
/>
)
})}
2020-11-22 00:46:23 +01:00
/>
<Stack.Screen
name='Screen-Me-Favourites'
component={ScreenMeFavourites}
options={({ navigation }: any) => ({
2020-12-13 23:38:37 +01:00
headerTitle: t('meFavourites:heading'),
headerLeft: () => (
<HeaderLeft
icon='chevron-left'
onPress={() => navigation.goBack()}
/>
)
})}
2020-11-22 00:46:23 +01:00
/>
<Stack.Screen
name='Screen-Me-Lists'
component={ScreenMeLists}
options={({ navigation }: any) => ({
2020-12-13 23:38:37 +01:00
headerTitle: t('meLists:heading'),
headerLeft: () => (
<HeaderLeft
icon='chevron-left'
onPress={() => navigation.goBack()}
/>
)
})}
2020-11-22 00:46:23 +01:00
/>
<Stack.Screen
name='Screen-Me-Lists-List'
component={ScreenMeListsList}
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}
options={({ navigation }: any) => ({
2020-12-13 23:38:37 +01:00
headerTitle: t('meSettings:heading'),
headerLeft: () => (
<HeaderLeft
icon='chevron-left'
onPress={() => navigation.goBack()}
/>
)
})}
2020-11-22 00:46:23 +01:00
/>
2020-11-21 13:19:05 +01:00
{sharedScreens(Stack)}
</Stack.Navigator>
)
}
export default ScreenMe