Sample event rendering
This commit is contained in:
parent
78064e3f8f
commit
24bcaa6d23
|
@ -1,3 +1,11 @@
|
|||
export default function Event() {
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export default function Event({
|
||||
title,
|
||||
}) {
|
||||
return (<strong>{title}</strong>);
|
||||
}
|
||||
|
||||
Event.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue