From a1ee76afd2024c0574f6058c6670e53b9424d540 Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Mon, 11 Mar 2024 22:47:11 +0100 Subject: [PATCH] Fix timings --- src/contexts/AppContext.tsx | 6 +----- src/pages/Home.tsx | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/contexts/AppContext.tsx b/src/contexts/AppContext.tsx index 5be80c6..ee3e8cd 100644 --- a/src/contexts/AppContext.tsx +++ b/src/contexts/AppContext.tsx @@ -31,7 +31,7 @@ export const AppProvider = (props: { children: JSXElement }) => { inactivityCounter = setTimeout(() => { updateStore('isInactive', () => true) - }, 30 * 60_000); + }, 3 * 60_000); }; // EFFECTS -------------------------------------- @@ -44,10 +44,6 @@ export const AppProvider = (props: { children: JSXElement }) => { document.removeEventListener('mousemove', monitorActivity); }); - createEffect(() => { - console.log('INACTIVE: ', store.isInactive) - }) - // STORES --------------------------------------- const [store, updateStore] = createStore({ diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 51802ee..328eba5 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -73,7 +73,7 @@ const Home: Component = () => { setNewPostAuthors(() => []); } - const timeout = 10_000; //25_000 + Math.random() * 10_000; + const timeout = 25_000 + Math.random() * 10_000; checkNewNotesTimer = setInterval(() => { context?.actions.checkForNewNotes(hex);