0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +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 Admin = ()=>{
const [currentTab, setCurrentTab] = useState('brew');
const [currentTab, setCurrentTab] = useState('');
useEffect(()=>{
setCurrentTab(localStorage.getItem('hbAdminTab'));
setCurrentTab(localStorage.getItem('hbAdminTab') || 'brew');
}, []);
useEffect(()=>{