import React from 'react';
import { StyleSheet, View, Button, SafeAreaView } from 'react-native';

export default function HomeScreen() {
  return (
    <SafeAreaView style={styles.container}>
      <View style={styles.grid}>
        {[...Array(8)].map((_, i) => (
          <View key={i} style={styles.buttonContainer}>
            <Button title={`测试 ${i + 1}`} onPress={() => {}} />
          </View>
        ))}
      </View>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    marginTop: 20,
  },
  grid: {
    flexDirection: 'row',
    flexWrap: 'wrap',
    justifyContent: 'center',
  },
  buttonContainer: {
    width: '40%',
    margin: 10,
  },
});
