From 1eec4740078691bc627d8e5b5b7494faea177db1 Mon Sep 17 00:00:00 2001 From: "M. Gschwandtner" <84477901+m-gschwandtner@users.noreply.github.com> Date: Sat, 17 Dec 2022 04:10:06 +0100 Subject: [PATCH] fix: heatmap popup showing after logging out (#761) * fix for heatmap popup showing after logging out * moved node.remove to component unmount * Update web/src/components/UsageHeatMap.tsx Co-authored-by: boojack Co-authored-by: M. Gschwandtner <84477901+OnlyPain-ctrl@users.noreply.github.com> Co-authored-by: boojack --- web/src/components/UsageHeatMap.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/components/UsageHeatMap.tsx b/web/src/components/UsageHeatMap.tsx index 50292c97..234395f3 100644 --- a/web/src/components/UsageHeatMap.tsx +++ b/web/src/components/UsageHeatMap.tsx @@ -58,6 +58,10 @@ const UsageHeatMap = () => { .catch((error) => { console.error(error); }); + + return () => { + handleUsageStatItemMouseLeave(); + }; }, [memos.length]); const handleUsageStatItemMouseEnter = useCallback((event: React.MouseEvent, item: DailyUsageStat) => {