import React from 'react';
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
import { useNavigation } from '@react-navigation/native';

const HomeScreen = () => {
  const navigation = useNavigation();
  const getJump = async (data) => {
    navigation.navigate(data);
  };
  return (
    <View style={styles.main}>
      <View>
        <TouchableOpacity onPress={() => getJump('Face')}>
          <Text>球队</Text>
        </TouchableOpacity>
        <TouchableOpacity onPress={() => getJump('Custom')}>
          <Text>数据</Text>
        </TouchableOpacity>
        <TouchableOpacity onPress={() => getJump('Custom')}>
          <Text>PLAY</Text>
        </TouchableOpacity>
        <TouchableOpacity onPress={() => getJump('Custom')}>
          <Text>赛事</Text>
        </TouchableOpacity>
        <TouchableOpacity onPress={() => getJump('Custom')}>
          <Text>我的</Text>
        </TouchableOpacity>
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  main: {
    paddingTop: 50,
  },
});

export default HomeScreen;
