From f5963192d1230fa6fb2a5d70b0fe48fe379b3b3d Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 16 Jul 2015 09:04:57 -0700 Subject: [PATCH] move transcript rending into method --- common/app/routes/Hikes/components/Lecture.jsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/app/routes/Hikes/components/Lecture.jsx b/common/app/routes/Hikes/components/Lecture.jsx index d59622df3d..e18a0eaeb8 100644 --- a/common/app/routes/Hikes/components/Lecture.jsx +++ b/common/app/routes/Hikes/components/Lecture.jsx @@ -44,17 +44,19 @@ export default contain( this.transitionTo(`/hikes/${dashedName}/questions/1`); }, + renderTranscript(transcript) { + return transcript.map((line, index) => ( +

{ line }

+ ) + ); + }, + render() { const { title, challengeSeed = ['1'], description = [] } = this.props.currentHike; - const transcript = description.map(line => { - return ( -

{ line }

- ); - }); const [ id ] = challengeSeed; @@ -73,7 +75,7 @@ export default contain(

- { transcript } + { this.renderTranscript(description) }