2020-11-15 20:29:43 +01:00
|
|
|
import React from 'react'
|
|
|
|
import { Alert, Pressable, Text } from 'react-native'
|
2020-11-08 01:10:38 +01:00
|
|
|
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
|
2020-11-08 19:13:46 +01:00
|
|
|
import { useNavigation } from '@react-navigation/native'
|
2020-11-08 01:10:38 +01:00
|
|
|
|
2020-11-15 20:29:43 +01:00
|
|
|
import PostMain from './PostToot/PostMain'
|
2020-11-08 01:10:38 +01:00
|
|
|
|
2020-11-15 20:29:43 +01:00
|
|
|
const Stack = createNativeStackNavigator()
|
2020-11-08 01:10:38 +01:00
|
|
|
|
|
|
|
const PostToot: React.FC = () => {
|
2020-11-08 19:13:46 +01:00
|
|
|
const navigation = useNavigation()
|
|
|
|
|
2020-11-08 01:10:38 +01:00
|
|
|
return (
|
|
|
|
<Stack.Navigator>
|
|
|
|
<Stack.Screen
|
2020-11-15 20:29:43 +01:00
|
|
|
name='PostMain'
|
|
|
|
component={PostMain}
|
2020-11-08 01:10:38 +01:00
|
|
|
options={{
|
2020-11-08 19:13:46 +01:00
|
|
|
headerLeft: () => (
|
|
|
|
<Pressable
|
|
|
|
onPress={() =>
|
|
|
|
Alert.alert('确认取消编辑?', '', [
|
|
|
|
{ text: '继续编辑', style: 'cancel' },
|
|
|
|
{
|
|
|
|
text: '退出编辑',
|
|
|
|
style: 'destructive',
|
|
|
|
onPress: () => navigation.goBack()
|
|
|
|
}
|
|
|
|
])
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<Text>退出编辑</Text>
|
|
|
|
</Pressable>
|
|
|
|
),
|
2020-11-08 01:10:38 +01:00
|
|
|
headerCenter: () => <></>,
|
2020-11-08 19:13:46 +01:00
|
|
|
headerRight: () => (
|
|
|
|
<Pressable>
|
|
|
|
<Text>发嘟嘟</Text>
|
|
|
|
</Pressable>
|
|
|
|
)
|
2020-11-08 01:10:38 +01:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</Stack.Navigator>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default PostToot
|