Skip to content

Commit

Permalink
fix: special break failures
Browse files Browse the repository at this point in the history
  • Loading branch information
roldanjr committed Jul 10, 2020
1 parent 8083632 commit eaa41bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 3 additions & 2 deletions app/src/contexts/CounterContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import sixtySecondsLeftLongBreak from "assets/audios/sixty-seconds-left-long-bre
import thirtySecondsLeftToWork from "assets/audios/thirty-seconds-left-to-work.wav";

import notificationIconDark from "assets/logos/notification-dark.png";
import { padNum } from "utils";

type CounterProps = {
count: number;
Expand Down Expand Up @@ -123,7 +124,7 @@ const CounterProvider: React.FC = ({ children }) => {
if (timer.playing) {
interval = setInterval(() => {
const d = new Date();
const ct = d.getHours() + ":" + d.getMinutes();
const ct = padNum(d.getHours()) + ":" + padNum(d.getMinutes());

if (timer.timerType !== SPECIAL_BREAK) {
switch (ct) {
Expand Down Expand Up @@ -181,7 +182,7 @@ const CounterProvider: React.FC = ({ children }) => {
} else {
return clearInterval(interval);
}
}, 300);
}, 1000);
}

return () => clearInterval(interval);
Expand Down
7 changes: 0 additions & 7 deletions app/src/declarations.d.ts

This file was deleted.

0 comments on commit eaa41bf

Please sign in to comment.