mirror of
https://github.com/status-im/snt-voting.git
synced 2025-02-23 15:48:10 +00:00
Displaying empty screen when no polls are available
This commit is contained in:
parent
15b4dd0e55
commit
ac199c1f40
@ -56,7 +56,7 @@ class TitleScreen extends Component {
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps){
|
||||
if (this.props.polls !== prevProps.polls) {
|
||||
if (this.props.polls !== prevProps.polls && this.props.polls && this.props.polls.length) {
|
||||
const seconds = this.props.polls[0]._endTime - (new Date()).getTime() / 1000
|
||||
if(seconds > 0){
|
||||
let timeLeftVar = this.secondsToTime(seconds);
|
||||
|
Loading…
x
Reference in New Issue
Block a user