Permalink
Browse files

Fix counter

  • Loading branch information...
1 parent e86e28e commit 774d64ee02c7366126a9126fb3dd149d43324c1e @cdujeu cdujeu committed Oct 15, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/src/plugins/action.demo_counter/react/DemoDeathCounter.js
@@ -6,9 +6,9 @@
// Compute next occurence of 0 or 30
let d = new Date();
- let remainingMinutes = 30 - d.getMinutes() % 30;
- let remainingSeconds = 60 - d.getSeconds();
- if(remainingMinutes === 30) {
+ let remainingMinutes = 29 - d.getMinutes() % 30;
+ let remainingSeconds = 59 - d.getSeconds();
+ if(remainingMinutes === 0) {
this.setState({timeLeft: (remainingSeconds < 10 ? '0' + remainingSeconds : remainingSeconds) + 's' });
}else{
this.setState({timeLeft: remainingMinutes + '\'' + (remainingSeconds < 10 ? '0' + remainingSeconds : remainingSeconds) + 'mn' });

0 comments on commit 774d64e

Please sign in to comment.