Sample event rendering

This commit is contained in:
Vencislav Atanasov 2024-09-22 02:08:52 +03:00
parent 78064e3f8f
commit 24bcaa6d23
2 changed files with 20 additions and 2 deletions

View File

@ -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,
};

View File

@ -1,4 +1,5 @@
export default function useScheduleTable({ export default function useScheduleTable({
events = {},
halls = {}, halls = {},
lang, lang,
}) { }) {
@ -8,7 +9,16 @@ export default function useScheduleTable({
name: hall.name[lang], name: hall.name[lang],
})); }));
const rows = []; const rows = Object.entries(events).map(([eventId, event]) => ({
id: eventId,
cells: [{
id: 1,
attributes: {
colSpan: 2,
},
event,
}],
}));
return { return {
header, header,