Implement the old template rendering of the event component

This commit is contained in:
Vencislav Atanasov 2024-09-22 04:03:45 +03:00
parent 89d6ad71d9
commit 316e75c3f7
1 changed files with 16 additions and 9 deletions

View File

@ -1,11 +1,18 @@
import PropTypes from 'prop-types'; import { isTrackHidden } from './utils.js';
import Speaker from './Speaker.jsx';
import FeedbackLink from './FeedbackLink.jsx';
export default function Event({ export default function Event(event) {
title, return (<>
}) { <a href={'#lecture-'.concat(event.id)}>{event.title}</a>
return (<strong>{title}</strong>); <br />
{event.participant_users && !isTrackHidden(event.track) && <>
{event.participant_users.map(speaker => speaker && <Speaker key={speaker.id} {...speaker} />)}
</>}
<p>
<i>
<FeedbackLink {...event} />
</i>
</p>
</>);
} }
Event.propTypes = {
title: PropTypes.string.isRequired,
};