From b53de67c6f19a6e719aa95130292bc3f1202aabb Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Sat, 21 Sep 2024 23:14:13 +0300 Subject: [PATCH] Fix rendering of schedule tracks, use CSS classes from the old template --- src/Schedule.jsx | 157 +++++++++++++++++++++++++---------------------- 1 file changed, 84 insertions(+), 73 deletions(-) diff --git a/src/Schedule.jsx b/src/Schedule.jsx index a692817..3b6ca16 100644 --- a/src/Schedule.jsx +++ b/src/Schedule.jsx @@ -5,6 +5,8 @@ import { Fragment } from 'react'; import useScheduleTable from './hooks/useScheduleTable.js'; import Event from './Event.jsx'; import defaultSpeaker from './assets/default-speaker.png'; +import './Schedule.scss'; +import { langs } from './constants.js'; export default function Schedule({ conferenceId, @@ -32,83 +34,92 @@ export default function Schedule({ return (<> {isLoading && <>Loading... } - {halls && - - - {header.map(hall => )} - - - - {rows.map(row => - {row.cells.map(cell => )} - )} - - - - {header.map(hall => )} - - -
{hall.name}
- -
{hall.name}
} - {tracks && Object.entries(tracks).filter(([, track]) => - !isTrackHidden(track) - ).map(([trackId, track]) =>
+ {halls && {track.name[lang]} - )} - {events && tracks && Object.entries(events).map(([eventId, event]) =>
-

- {event.title} - {event.participant_user_ids && !isTrackHidden(tracks[event.track_id]) && speakers && <> - ({event.participant_user_ids.map(speakerId => speakers[speakerId] && - - {getSpeakerName(speakers[speakerId])} - - {speakers[speakerId].organisation && <> - /⁠{speakers[speakerId].organisation}⁠/ - } - ).filter(item => !!item)}) - } -

- {event.abstract &&

- {event.abstract} -

} -

- - Submit feedback - -

-
-
)} - {speakers && <> -
- {Object.entries(speakers).map(([speakerId, speaker]) =>
- - {getSpeakerName(speaker)} - -
)} -
- {Object.entries(speakers).map(([speakerId, speaker]) =>
- {getSpeakerName(speaker)}/ -

{getSpeakerName(speaker)}

+
+ + {header.map(hall => )} + + + + {rows.map(row => + {row.cells.map(cell => )} + )} + + + + {header.map(hall => )} + + +
{hall.name}
+ +
{hall.name}
} +
+ {tracks && + + {Object.entries(tracks).filter(([, track]) => + !isTrackHidden(track) + ).map(([trackId, track]) => + + )} + {Object.entries(langs).map(([code, name]) => + + )} + +
{track.name[lang]}
{name}
} + {events && tracks && Object.entries(events).map(([eventId, event]) =>
+

+ {event.title} + {event.participant_user_ids && !isTrackHidden(tracks[event.track_id]) && speakers && <> + ({event.participant_user_ids.map(speakerId => speakers[speakerId] && + + {getSpeakerName(speakers[speakerId])} + + {speakers[speakerId].organisation && <> + /⁠{speakers[speakerId].organisation}⁠/ + } + ).filter(item => !!item)}) + } +

+ {event.abstract &&

+ {event.abstract} +

} +

+ + Submit feedback + +

+
+
)} + {speakers && <>
- {speaker.twitter && - twitter - } - {speaker.github && - github - } + {Object.entries(speakers).map(([speakerId, speaker]) =>
+ + {getSpeakerName(speaker)} + +
)}
-

{speaker.biography}

-
)} - } + {Object.entries(speakers).map(([speakerId, speaker]) =>
+ {getSpeakerName(speaker)}/ +

{getSpeakerName(speaker)}

+
+ {speaker.twitter && + twitter + } + {speaker.github && + github + } +
+

{speaker.biography}

+
)} + } +
); }