Skip to content

Commit

Permalink
fixing socket connection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lexmartinez committed Jun 25, 2018
1 parent 113e6a9 commit 63283df
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/components/VotePanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ export default class VotePanel extends React.Component<VotePanelProps, {}> {
const { session } = this.props
const voting = session.voting[session.current] || []
return (
<div className={'story-v-container'}>
<Pusher
channel={session.sid}
event={'vote-event'}
onUpdate={this.handleVote}/>
<div>
<p className={'story-v-title'}><b>{i18n.t('session.current')}: </b>{session.backlog[session.current]}</p>
{
voting.map((vote: any) =>
Expand Down Expand Up @@ -90,22 +86,26 @@ export default class VotePanel extends React.Component<VotePanelProps, {}> {
return this.renderMessage(session.status === 'CREATED' ? i18n.t('session.noVoting') : i18n.t('session.completed'))
}

if (voted) return this.renderVotingTable()

return (
<div className={'story-v-container'}>
<p className={'story-v-title'}><b>{i18n.t('session.current')}: </b>{session.backlog[session.current]}</p>
<div className={'deck-container'}>
{
fibo.map((card: any) =>
<a className={'v-card'} key={card} onClick={() => { this.sendVote(card) }}>
{
card === 'X' ? <i className={'fa fa-coffee'}></i> :
card === '?' ? <i className={'fa fa-question'}></i> : card
}
</a>)
}
</div>
{
voted ? this.renderVotingTable() :
<div>
<p className={'story-v-title'}><b>{i18n.t('session.current')}: </b>{session.backlog[session.current]}</p>
<div className={'deck-container'}>
{
fibo.map((card: any) =>
<a className={'v-card'} key={card} onClick={() => { this.sendVote(card) }}>
{
card === 'X' ? <i className={'fa fa-coffee'}></i> :
card === '?' ? <i className={'fa fa-question'}></i> : card
}
</a>)
}
</div>
</div>
}

<Pusher
channel={session.sid}
event={'vote-event'}
Expand Down

0 comments on commit 63283df

Please sign in to comment.