Skip to content

Commit

Permalink
refactor: remove redundant arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
CostasAK committed Jul 9, 2024
1 parent 5b4beeb commit 8ab2721
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/layout/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ function useLocalTime() {
const [on, toggle] = useToggle();

useEffect(() => {
const timer = setTimeout(
() => {
toggle();
},
MINUTE - (Date.now() % MINUTE),
);
const timer = setTimeout(toggle, MINUTE - (Date.now() % MINUTE));

return () => clearTimeout(timer);
}, [on, toggle]);
Expand All @@ -29,9 +24,7 @@ function useEorzeanTime() {

useEffect(() => {
const timer = setTimeout(
() => {
toggle();
},
toggle,
(MINUTE - ((Date.now() * eorzeanFactor) % MINUTE)) / eorzeanFactor,
);

Expand Down

0 comments on commit 8ab2721

Please sign in to comment.