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:
@@ -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(()=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user