0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-26 06:08:11 +00:00

Merge branch 'master' into GMB_Compats_1

This commit is contained in:
Trevor Buckner
2025-05-09 09:29:12 -04:00
committed by GitHub
6 changed files with 369 additions and 213 deletions

View File

@@ -116,6 +116,13 @@ const BrewRenderer = (props)=>{
pageShadows : true
});
//useEffect to store or gather toolbar state from storage
useEffect(()=>{
const toolbarState = JSON.parse(window.localStorage.getItem('hb_toolbarState'));
console.log('toolbar state:', toolbarState);
toolbarState && setDisplayOptions(toolbarState);
}, []);
const [headerState, setHeaderState] = useState(false);
const mainRef = useRef(null);
@@ -270,6 +277,7 @@ const BrewRenderer = (props)=>{
const handleDisplayOptionsChange = (newDisplayOptions)=>{
setDisplayOptions(newDisplayOptions);
localStorage.setItem('hb_toolbarState', JSON.stringify(newDisplayOptions));
};
const pagesStyle = {