mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-05-19 12:38:37 -05:00
Fixed the latest test bug
This commit is contained in:
@@ -22,9 +22,12 @@ function LatestTestComponent() {
|
||||
});
|
||||
}, [setLatest]);
|
||||
|
||||
setTimeout(() => {
|
||||
setLatestTestTime(generateRelativeTime(latest.created));
|
||||
}, 1000);
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => setLatestTestTime(generateRelativeTime(latest.created)), 1000);
|
||||
return () => {
|
||||
clearInterval(interval);
|
||||
};
|
||||
}, [setLatestTestTime, latest]);
|
||||
|
||||
if (Object.entries(config).length === 0) return (<></>)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user