import React, { useState } from 'react'; import { View, FlatList, StyleSheet } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { StackNavigationProp } from '@react-navigation/stack'; import TaskCard from '../components/TaskCard'; import { Task } from '../types/task'; import { MOCK_TASKS } from '../data/mockData'; type RootStackParamList = { TaskList: undefined; TaskEdit: { taskId: string }; }; type TaskListNavigationProp = StackNavigationProp; export default function TaskListScreen() { const [tasks] = useState(MOCK_TASKS); const navigation = useNavigation(); const handlePressTask = (taskId: string) => { navigation.navigate('TaskEdit', { taskId }); }; return ( } keyExtractor={item => item.id} numColumns={2} columnWrapperStyle={styles.row} /> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#f5f5f5', }, row: { justifyContent: 'center', }, });