diff --git a/src/Schedule/Event.jsx b/src/Schedule/Event.jsx index 25a7dbd..1e71e60 100644 --- a/src/Schedule/Event.jsx +++ b/src/Schedule/Event.jsx @@ -1,3 +1,11 @@ -export default function Event() { +import PropTypes from 'prop-types'; +export default function Event({ + title, +}) { + return ({title}); } + +Event.propTypes = { + title: PropTypes.string.isRequired, +}; diff --git a/src/hooks/useScheduleTable.js b/src/hooks/useScheduleTable.js index 536af2f..d59f8d8 100644 --- a/src/hooks/useScheduleTable.js +++ b/src/hooks/useScheduleTable.js @@ -1,4 +1,5 @@ export default function useScheduleTable({ + events = {}, halls = {}, lang, }) { @@ -8,7 +9,16 @@ export default function useScheduleTable({ name: hall.name[lang], })); - const rows = []; + const rows = Object.entries(events).map(([eventId, event]) => ({ + id: eventId, + cells: [{ + id: 1, + attributes: { + colSpan: 2, + }, + event, + }], + })); return { header,