import { Todo } from "@/store/useTodos"; import { FlatList } from "react-native"; import { VStack } from "./ui/vstack"; import { Text } from "./ui/text"; import { HStack } from "./ui/hstack"; import { Checkbox, CheckboxIcon, CheckboxIndicator, CheckboxLabel, } from "./ui/checkbox"; import { Button, ButtonText } from "./ui/button"; import { GS } from "./ui/gluestack-ui-provider/gluestack-ui-token"; type Props = { data: Todo[]; onToggle: (id: string) => void; onRemove?: (id: string) => void; }; export default function TodoList({ data, onToggle, onRemove }: Props) { return ( it.id} contentContainerStyle={{ paddingBottom: 80 }} renderItem={({ item }) => ( onToggle(item.id)} value={item.title} > {item.title} {onRemove ? ( ) : null} )} ListEmptyComponent={ 할 일이 없습니다. } /> ); }