mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-04-11 00:30:19 +02:00
eslint for mobile + new maps API key + cleaning
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export function useTimeDifference(refTime, timeout) {
|
||||
export const useTimeDifference = (refTime, timeout) => {
|
||||
// If refTime is in the past, time will be positive
|
||||
// If refTime is in the future, time will be negative
|
||||
// The time is updated every timeout milliseconds
|
||||
@@ -15,7 +15,7 @@ export function useTimeDifference(refTime, timeout) {
|
||||
const interval = setInterval(updateTime, timeout);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}, [refTime]);
|
||||
}, [refTime, timeout]);
|
||||
|
||||
return [time];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user