From 6c433b452fc58013c3255961eec0aa1b0a2612a6 Mon Sep 17 00:00:00 2001
From: Steven <stevenlgtm@gmail.com>
Date: Wed, 8 Nov 2023 22:58:35 +0800
Subject: [PATCH] chore: update user checks

---
 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 34610062..7fe759e8 100644
--- a/web/src/components/UsageHeatMap.tsx
+++ b/web/src/components/UsageHeatMap.tsx
@@ -52,6 +52,10 @@ const UsageHeatMap = () => {
   const [currentStat, setCurrentStat] = useState<DailyUsageStat | null>(null);
   const containerElRef = useRef<HTMLDivElement>(null);
 
+  if (!user) {
+    return;
+  }
+
   useEffect(() => {
     userV1Store.getOrFetchUserByUsername(extractUsernameFromName(user.name)).then((user) => {
       if (!user) {