Skip to content

Commit

Permalink
Merge pull request #66 from vnma0/date-format
Browse files Browse the repository at this point in the history
Clock : now shows no duplicate text upon contest ended
  • Loading branch information
minhducsun2002 committed Mar 5, 2019
2 parents 2c7e8e4 + 44646df commit 0ec518e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/globalStatusBar/clock/clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class CountdownClock extends Component {
disabled
>
<AccessTime style={{ marginRight: '10px' }} />
{this.props.children
? this.props.children : this.props.timeLeft + ' / ' + this.props.duration}
{this.props.ended
? 'ENDED' : (this.props.children ? this.props.children : this.props.timeLeft + ' / ' + this.props.duration)}
</Button>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/globalStatusBar/globalStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class GlobalStatusBar extends Component {
if (this.props.loggedIn)
// if logged in, show the clock, otherwise hide it
return (
<CountdownClock ended={this.props.contestEnded}>
<CountdownClock ended={this.props.ended}>
{this.props.started
? `${this.props.contestTimeLeft} / ${this.props.contestDuration}`
: `${this.props.contestTimeLeft} before start`}
Expand Down

0 comments on commit 0ec518e

Please sign in to comment.