2020-12-13 14:04:25 +01:00
|
|
|
import Timeline from '@components/Timelines/Timeline'
|
|
|
|
import sharedScreens from '@screens/Shared/sharedScreens'
|
2021-01-07 19:13:09 +01:00
|
|
|
import { getLocalActiveIndex } from '@utils/slices/instancesSlice'
|
|
|
|
import React from 'react'
|
2020-11-29 13:11:23 +01:00
|
|
|
import { useTranslation } from 'react-i18next'
|
2021-01-07 19:13:09 +01:00
|
|
|
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
|
|
|
|
import { useSelector } from 'react-redux'
|
2020-10-24 18:07:09 +02:00
|
|
|
|
2021-01-07 22:18:14 +01:00
|
|
|
const Stack = createNativeStackNavigator<Nav.NotificationsStackParamList>()
|
2020-10-23 09:22:17 +02:00
|
|
|
|
2020-11-21 13:19:05 +01:00
|
|
|
const ScreenNotifications: React.FC = () => {
|
2020-11-29 13:11:23 +01:00
|
|
|
const { t } = useTranslation()
|
2021-01-07 19:13:09 +01:00
|
|
|
const localActiveIndex = useSelector(getLocalActiveIndex)
|
2020-10-24 18:07:09 +02:00
|
|
|
|
|
|
|
return (
|
2020-11-29 13:11:23 +01:00
|
|
|
<Stack.Navigator
|
2020-12-25 21:51:46 +01:00
|
|
|
screenOptions={{
|
|
|
|
headerTitle: t('notifications:heading'),
|
|
|
|
headerHideShadow: true
|
|
|
|
}}
|
2020-11-29 13:11:23 +01:00
|
|
|
>
|
2020-11-24 00:18:47 +01:00
|
|
|
<Stack.Screen name='Screen-Notifications-Root'>
|
2021-01-07 19:13:09 +01:00
|
|
|
{() =>
|
|
|
|
localActiveIndex !== null ? <Timeline page='Notifications' /> : null
|
|
|
|
}
|
2020-10-24 18:07:09 +02:00
|
|
|
</Stack.Screen>
|
2020-10-30 20:03:44 +01:00
|
|
|
|
|
|
|
{sharedScreens(Stack)}
|
2020-10-24 18:07:09 +02:00
|
|
|
</Stack.Navigator>
|
|
|
|
)
|
2020-10-23 09:22:17 +02:00
|
|
|
}
|
2020-10-31 21:04:46 +01:00
|
|
|
|
2020-11-21 13:19:05 +01:00
|
|
|
export default ScreenNotifications
|