import React from 'react'; import { View, Text, Image, SafeAreaView } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { Button, List, ActionSheet } from '@ant-design/react-native'; import { useSelector, useDispatch } from 'react-redux'; import { RematchDispatch, Models } from '@rematch/core'; import WhenFocusStatusBar from '../../components/WhenFocusStatusBar'; import Entypo from 'react-native-vector-icons/Entypo'; import { color } from '../../constants'; import { RootState, RootModels } from '../../store'; import { ScreenNavigationProp } from '../../interface'; import styles from './style'; export default () => { const { user } = useDispatch>(); const { sysUser } = useSelector((state:RootState) => state.user); const handleShowActionSheet = React.useCallback(() => { ActionSheet.showActionSheetWithOptions({ title: `确定要退出${sysUser.username}吗?`, options: ['退出', '取消'], cancelButtonIndex: 1, destructiveButtonIndex: 0 }, buttonIndex => { if(buttonIndex === 0) { user.logout(); } }) }, []) return ( 你好,{sysUser.username} } extra={{sysUser.phone}}> 手机号 ) }