diff --git a/src/common/enums/time.ts b/src/common/enums/time.ts index edc62bd459..d43197c4b9 100644 --- a/src/common/enums/time.ts +++ b/src/common/enums/time.ts @@ -1,4 +1,4 @@ -export const POLL_INTERVAL = 1000 * 10 +export const POLL_INTERVAL = 1000 * 20 export const INPUT_DEBOUNCE = 300 diff --git a/src/components/GlobalHeader/Nav/index.tsx b/src/components/GlobalHeader/Nav/index.tsx index 06b32dd5d4..683678d1c1 100644 --- a/src/components/GlobalHeader/Nav/index.tsx +++ b/src/components/GlobalHeader/Nav/index.tsx @@ -27,7 +27,9 @@ const Nav = () => { // FIXME: https://github.com/apollographql/apollo-client/issues/3775 useEffect(() => { - startPolling(POLL_INTERVAL) + if (viewer.isAuthed) { + startPolling(POLL_INTERVAL) + } }, []) return ( diff --git a/src/components/GlobalHeader/NotificationButton/index.tsx b/src/components/GlobalHeader/NotificationButton/index.tsx index 550b6e2e69..cd7a1ae34b 100644 --- a/src/components/GlobalHeader/NotificationButton/index.tsx +++ b/src/components/GlobalHeader/NotificationButton/index.tsx @@ -123,7 +123,9 @@ const NotificationButton = () => { // FIXME: https://github.com/apollographql/apollo-client/issues/3775 useEffect(() => { - startPolling(POLL_INTERVAL) + if (viewer.isAuthed) { + startPolling(POLL_INTERVAL) + } }, []) return (