From bdf2bbce3c3d0469de209b5d3f616f5665f3d489 Mon Sep 17 00:00:00 2001 From: balaji-jr Date: Tue, 18 Jun 2024 23:35:04 +0530 Subject: [PATCH 1/2] readme - updated the demo app url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b48d8ef7..1aedc2b5 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ For complete Parseable API documentation, refer to [Parseable API workspace on P - + From a9491193f04d46571b3455814679ce0c6557fc97 Mon Sep 17 00:00:00 2001 From: balaji-jr Date: Sun, 30 Jun 2024 15:38:36 +0530 Subject: [PATCH 2/2] unmount interval instance properly --- src/components/Header/RefreshInterval.tsx | 5 ++--- src/pages/Systems/ServerDetails.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/Header/RefreshInterval.tsx b/src/components/Header/RefreshInterval.tsx index d3bfe076..f3d56937 100644 --- a/src/components/Header/RefreshInterval.tsx +++ b/src/components/Header/RefreshInterval.tsx @@ -6,6 +6,7 @@ import { useEffect, useMemo, useRef } from 'react'; import { REFRESH_INTERVALS } from '@/constants/timeConstants'; import classes from './styles/LogQuery.module.css'; import { useLogsStore, logsStoreReducers } from '@/pages/Stream/providers/LogsProvider'; +import _ from 'lodash'; const { setRefreshInterval, getCleanStoreForRefetch } = logsStoreReducers; const RefreshInterval: FC = () => { @@ -38,9 +39,7 @@ const RefreshInterval: FC = () => { timerRef.current = intervalId; } - return () => { - clearIntervalInstance() - } + return () => timerRef.current ? clearInterval(timerRef.current) : _.noop(); }, [refreshInterval]); const { intervalbtn } = classes; diff --git a/src/pages/Systems/ServerDetails.tsx b/src/pages/Systems/ServerDetails.tsx index 866e11a2..8607b267 100644 --- a/src/pages/Systems/ServerDetails.tsx +++ b/src/pages/Systems/ServerDetails.tsx @@ -63,7 +63,7 @@ const ServerDetail = () => { timerRef.current = intervalId; } - return () => clearIntervalInstance(); + return () => timerRef.current ? clearInterval(timerRef.current) : _.noop(); }, [clusterStore.currentMachine]); return (
URLhttps://demo.parseable.iohttps://demo.parseable.com
Username