Skip to content

Commit 56656e7

Browse files
authored
Merge pull request #13 from amrlabib/fix/#12
use calculateExpiryDate in useTimer interval instead of subtractSecond
2 parents 504a286 + cbcd4f6 commit 56656e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useTimer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function useTimer(settings) {
6363
function start() {
6464
if(isValidExpiryTimestamp(expiryTimestamp) && !intervalRef.current) {
6565
calculateExpiryDate();
66-
intervalRef.current = setInterval(() => subtractSecond(), 1000);
66+
intervalRef.current = setInterval(() => calculateExpiryDate(), 1000);
6767
}
6868
}
6969

0 commit comments

Comments
 (0)