fix: unify tender countdowns and add monthly calendar navigation
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import {useEffect, useState} from 'react';
|
||||
// Keep expiry labels current even when the user leaves a screen open.
|
||||
export function useDeadlineClock() {
|
||||
const [now,setNow] = useState(() => new Date());
|
||||
useEffect(() => {
|
||||
const timer = setInterval(() => setNow(new Date()),30000);
|
||||
return () => clearInterval(timer);
|
||||
},[]);
|
||||
return now;
|
||||
}
|
||||
Reference in New Issue
Block a user