[web] Fix auth ticker (#1841)

This commit is contained in:
Manav Rathi 2024-05-24 14:16:32 +05:30 committed by GitHub
commit a0d26c860c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -198,7 +198,7 @@ const CodeDisplay: React.FC<CodeDisplay> = ({ code }) => {
// We need to call regen() once before the interval loop to set the
// initial otp and nextOTP.
regen();
interval = setInterval(() => regen, periodMs);
interval = setInterval(regen, periodMs);
}, timeToNextCode);
return () => interval && clearInterval(interval);