Use concatenated speaker name from API
This commit is contained in:
parent
338eb555ad
commit
04cf4740ac
|
@ -1,16 +1,14 @@
|
|||
import { getSpeakerName } from './utils.js';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export default function Speaker(speaker) {
|
||||
return (<>
|
||||
<a href={'#speaker-'.concat(speaker.id.toString())}>{getSpeakerName(speaker)}</a>
|
||||
<a href={'#speaker-'.concat(speaker.id.toString())}>{speaker.name}</a>
|
||||
{speaker.organisation && <>/⁠{speaker.organisation}⁠/</>}
|
||||
</>);
|
||||
}
|
||||
|
||||
Speaker.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
first_name: PropTypes.string.isRequired,
|
||||
last_name: PropTypes.string.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
organisation: PropTypes.string,
|
||||
};
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
export const getSpeakerName = speaker => speaker.first_name.concat(' ').concat(speaker.last_name);
|
||||
|
||||
export const isTrackHidden = track => track?.name?.en === 'Other' || track?.name?.bg === 'Други';
|
||||
|
|
Loading…
Reference in New Issue