0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-05 03:42:38 +00:00

Prevent BrewUtils from loading when it is not the current Admin tab

This commit is contained in:
G.Ambatte
2025-04-09 10:26:10 +12:00
parent e3de7b9f01
commit dc724492ef

View File

@@ -8,10 +8,10 @@ import LockTools from './lockTools/lockTools.jsx';
const tabGroups = ['brew', 'notifications', 'authors', 'locks']; const tabGroups = ['brew', 'notifications', 'authors', 'locks'];
const Admin = ()=>{ const Admin = ()=>{
const [currentTab, setCurrentTab] = useState('brew'); const [currentTab, setCurrentTab] = useState('');
useEffect(()=>{ useEffect(()=>{
setCurrentTab(localStorage.getItem('hbAdminTab')); setCurrentTab(localStorage.getItem('hbAdminTab') || 'brew');
}, []); }, []);
useEffect(()=>{ useEffect(()=>{