import { useState } from 'react'; import Store from '../../store'; import { setDone } from '../../store/actions'; import Card from '../ui/Card'; import Content from '../ui/Content'; import List from '../ui/List'; import ListItem from '../ui/ListItem'; import VirtualScroll from '../ui/VirtualScroll'; const ListEntry = ({ list, ...props }) => (
{list.name}
); const AllLists = ({ onSelect }) => { const lists = Store.useState(s => s.lists); return ( ( onSelect(list)} onClose={() => onSelect(null)} /> )} /> ); }; const ListItems = ({ list, onClose }) => { return ( <>
All Lists
} /> ); }; const ListItemEntry = ({ list, item }) => (
{item.name} { setDone(list, item, !item.done); }} />
); const Feed = ({ selected }) => { const selectedList = Store.useState(s => s.selectedList); return ( {selected && selectedList ? ( Store.update(s => { s.selectedList = null; }) } /> ) : ( { Store.update(s => { s.selectedList = list; }); }} /> )} ); }; export default Feed;