tooot/src/stacks/Notifications.jsx

37 lines
979 B
React
Raw Normal View History

2020-10-24 18:07:09 +02:00
import React, { useEffect, useState } from 'react'
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
import { Feather } from '@expo/vector-icons'
2020-10-23 09:22:17 +02:00
2020-10-24 18:07:09 +02:00
import Timeline from 'src/stacks/common/Timeline'
2020-10-30 20:03:44 +01:00
import sharedScreens from 'src/stacks/Shared/sharedScreens'
2020-10-24 18:07:09 +02:00
const Stack = createNativeStackNavigator()
2020-10-23 09:22:17 +02:00
export default function Notifications () {
2020-10-24 18:07:09 +02:00
const [renderHeader, setRenderHeader] = useState(false)
useEffect(() => {
const nbr = setTimeout(() => setRenderHeader(true), 50)
return
}, [])
return (
<Stack.Navigator
screenOptions={{
statusBarAnimation: 'none',
headerRight: () =>
renderHeader ? (
<Feather name='search' size={24} color='black' />
) : null,
headerTitle: '通知'
}}
>
<Stack.Screen name='Notifications'>
2020-10-30 00:10:25 +01:00
{() => <Timeline page='Notifications' />}
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
}