UNPKG

trc-client-core

Version:
37 lines (33 loc) 1.23 kB
import React from 'react'; import Reflux from 'reflux'; import moment from 'moment'; import StoreMixin from 'reflux-immutable/StoreMixin'; import ParticipantStore from 'trc-client-core/src/participant/ParticipantStore'; import ParticipantActions from 'trc-client-core/src/participant/ParticipantActions'; import {CALENDAR_YEAR} from 'trc-client-core/src/constants/QueryParameters'; import Markdown from 'trc-client-core/src/components/Markdown'; import technicalTrainers from 'trc-client-core/src/copy/technical/technicalTrainers'; var TechnicalTrainersList = React.createClass({ displayName: 'TechnicalTrainersList', mixins: [ StoreMixin, Reflux.listenTo(ParticipantStore, 'onStoreChange') ], getStoreState() { return { technicalTrainers: ParticipantStore.get('technicalTrainers').toJS() }; }, componentDidMount() { ParticipantActions.fetchTechnicalTrainers({ current: true, regionCode: 'ALL_REGIONS', year_type: CALENDAR_YEAR, year: moment().year().toString() }); }, render() { return <Markdown html={technicalTrainers}></Markdown>; } }); export default TechnicalTrainersList;