Skip to content

Commit cbcd4f6

Browse files
committed
use calculateExpiryDate in useTimer interval instead of subtractSecond
1 parent 71e35ee commit cbcd4f6

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)