mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-27 15:52:39 +00:00
Update adminPage storage keys
This commit is contained in:
@@ -7,15 +7,17 @@ import LockTools from './lockTools/lockTools.jsx';
|
||||
|
||||
const tabGroups = ['brew', 'notifications', 'authors', 'locks'];
|
||||
|
||||
const ADMIN_TAB = 'hbAdminTab';
|
||||
|
||||
const Admin = ()=>{
|
||||
const [currentTab, setCurrentTab] = useState('');
|
||||
|
||||
useEffect(()=>{
|
||||
setCurrentTab(localStorage.getItem('hbAdminTab') || 'brew');
|
||||
setCurrentTab(localStorage.getItem(ADMIN_TAB) || 'brew');
|
||||
}, []);
|
||||
|
||||
useEffect(()=>{
|
||||
localStorage.setItem('hbAdminTab', currentTab);
|
||||
localStorage.setItem(ADMIN_TAB, currentTab);
|
||||
}, [currentTab]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user