From dc724492efbf6debebbf6ae3584846fdf1c3c9b6 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 9 Apr 2025 10:26:10 +1200 Subject: [PATCH] Prevent BrewUtils from loading when it is not the current Admin tab --- client/admin/admin.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/admin/admin.jsx b/client/admin/admin.jsx index f59162e1d..29973d221 100644 --- a/client/admin/admin.jsx +++ b/client/admin/admin.jsx @@ -8,10 +8,10 @@ import LockTools from './lockTools/lockTools.jsx'; const tabGroups = ['brew', 'notifications', 'authors', 'locks']; const Admin = ()=>{ - const [currentTab, setCurrentTab] = useState('brew'); + const [currentTab, setCurrentTab] = useState(''); useEffect(()=>{ - setCurrentTab(localStorage.getItem('hbAdminTab')); + setCurrentTab(localStorage.getItem('hbAdminTab') || 'brew'); }, []); useEffect(()=>{