From 2afc4f2b6ad5337dbebe234b1fa53a11da4a10d2 Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Sun, 22 Sep 2024 04:01:57 +0300 Subject: [PATCH] Create speaker and feedback link components --- src/Schedule/FeedbackLink.jsx | 3 +++ src/Schedule/Speaker.jsx | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/Schedule/FeedbackLink.jsx create mode 100644 src/Schedule/Speaker.jsx diff --git a/src/Schedule/FeedbackLink.jsx b/src/Schedule/FeedbackLink.jsx new file mode 100644 index 0000000..1d774d9 --- /dev/null +++ b/src/Schedule/FeedbackLink.jsx @@ -0,0 +1,3 @@ +export default function FeedbackLink(event) { + return (Submit feedback); +} diff --git a/src/Schedule/Speaker.jsx b/src/Schedule/Speaker.jsx new file mode 100644 index 0000000..7001852 --- /dev/null +++ b/src/Schedule/Speaker.jsx @@ -0,0 +1,15 @@ +import { getSpeakerName } from './utils.js'; +import PropTypes from 'prop-types'; + +export default function Speaker(speaker) { + return (<> + {getSpeakerName(speaker)} + {speaker.organisation && <>/⁠{speaker.organisation}⁠/} + ); +} + +Speaker.propTypes = { + first_name: PropTypes.string.isRequired, + last_name: PropTypes.string.isRequired, + organisation: PropTypes.string, +};