diff --git a/src/Schedule/Speaker.jsx b/src/Schedule/Speaker.jsx
index 7001852..c6ef067 100644
--- a/src/Schedule/Speaker.jsx
+++ b/src/Schedule/Speaker.jsx
@@ -3,12 +3,13 @@ import PropTypes from 'prop-types';
export default function Speaker(speaker) {
return (<>
-
{getSpeakerName(speaker)}
+
{getSpeakerName(speaker)}
{speaker.organisation && <>/{speaker.organisation}/>}
>);
}
Speaker.propTypes = {
+ id: PropTypes.number.isRequired,
first_name: PropTypes.string.isRequired,
last_name: PropTypes.string.isRequired,
organisation: PropTypes.string,
diff --git a/src/hooks/useCfpRequest.js b/src/hooks/useCfpRequest.js
index 9c3e8a3..ee11474 100644
--- a/src/hooks/useCfpRequest.js
+++ b/src/hooks/useCfpRequest.js
@@ -1,6 +1,6 @@
import useSWR from 'swr';
-const fetcher = (...args) => fetch(...args).then(res => res.json());
+const fetcher = (input, init) => fetch(input, init).then(res => res.json());
export default function useCfpRequest(path) {
return useSWR(import.meta.env.VITE_CFP_BASE_URL.concat(path), fetcher);
diff --git a/src/hooks/useScheduleTable.js b/src/hooks/useScheduleTable.js
index e4b612c..6f7f6e3 100644
--- a/src/hooks/useScheduleTable.js
+++ b/src/hooks/useScheduleTable.js
@@ -3,14 +3,13 @@ export default function useScheduleTable({
halls = {},
lang,
}) {
- const hallIds = new Set(Object.keys(halls));
- const header = Object.entries(halls).filter(([id]) => hallIds.has(id)).map(([id, hall]) => ({
- id,
+ const header = Object.values(halls).map(hall => ({
+ id: hall.id,
name: hall.name[lang],
}));
- const rows = Object.entries(events).map(([eventId, event]) => ({
- id: eventId,
+ const rows = Object.values(events).map(event => ({
+ id: event.id,
cells: [{
id: 1,
attributes: {
diff --git a/src/utils.js b/src/utils.js
index cf372a2..b7c313c 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -45,7 +45,7 @@ export function calculateProgress(...elements) {
export const addIdAndRelations = (items, relations = []) =>
Object.fromEntries(Object.entries(items).map(([id, item]) =>
([id, {
- id,
+ id: parseInt(id, 10),
...item,
...Object.fromEntries(relations.map(([field, collection, idField]) => ([
field,