eventlist cleanup

This commit is contained in:
cv
2021-03-22 22:08:41 +01:00
parent 5cea1fb140
commit 1a2e5e19b9
5 changed files with 98 additions and 69 deletions
+28 -52
View File
@@ -1,56 +1,32 @@
import {
Table,
Thead,
Tbody,
Tr,
Th,
Td,
TableCaption,
Button,
} from '@chakra-ui/react';
import { Table, Thead, Tbody, Tr, Th } from '@chakra-ui/react';
import { useState } from 'react';
import { sampleData } from '../../../app/sampleData';
import EventListItem from './EventListItem';
export default function EventList(props) {
const [data, setData] = useState(sampleData);
export default function EventList() {
return (
<div className>
<Table variant='simple' size='sm'>
<TableCaption>Todays event list</TableCaption>
<Thead>
<Tr>
<Th>Event Title</Th>
<Th>Event Subtitle</Th>
<Th>Presenter Name</Th>
<Th>Time Start</Th>
<Th>Time End</Th>
<Th>Timer</Th>
<Th></Th>
</Tr>
</Thead>
<Tbody>
<Tr>
<Td>Title</Td>
<Td>Subtitle</Td>
<Td>Presenter</Td>
<Td>10:00</Td>
<Td>11:00</Td>
<Td>60.00</Td>
<Td>
<Button colorScheme='teal'></Button>
</Td>
</Tr>
<Tr>
<Td>Title</Td>
<Td>Subtitle</Td>
<Td>Presenter</Td>
<Td>10:00</Td>
<Td>11:00</Td>
<Td>60.00</Td>
<Td>
<Button colorScheme='teal'></Button>
</Td>
</Tr>
</Tbody>
</Table>
</div>
<Table variant='simple' size='sm'>
<Thead>
<Tr>
<Th>Event Title</Th>
<Th>Presenter Name</Th>
<Th>Time Start</Th>
<Th>Time End</Th>
<Th></Th>
</Tr>
</Thead>
<Tbody>
{data.events.map((e) => (
<EventListItem
key={e.id}
data={e}
isSelected={props.selected === e.id}
setSelected={props.setSelected}
/>
))}
</Tbody>
</Table>
);
}