import React, { PropTypes } from 'react'; import { Button, Col, Row, Panel } from 'react-bootstrap'; import { History } from 'react-router'; import Vimeo from 'react-vimeo'; import debugFactory from 'debug'; const debug = debugFactory('freecc:hikes'); export default React.createClass({ displayName: 'Lecture', mixins: [History], propTypes: { currentHike: PropTypes.object, params: PropTypes.object }, handleError: debug, handleFinish() { debug('loading questions'); const { dashedName } = this.props.params; this.history.pushState(null, `/hikes/${dashedName}/questions/1`); }, renderTranscript(transcript, dashedName) { return transcript.map((line, index) => (

{ line }

)); }, render() { const { title, challengeSeed = ['1'], description = [] } = this.props.currentHike; const { dashedName } = this.props.params; const [ id ] = challengeSeed; const videoTitle =

{ title }

; return ( { this.renderTranscript(description, dashedName) } ); } });