0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-05 05:52:46 +00:00

initial commit

This commit is contained in:
Víctor Losada Hernández
2025-03-19 14:04:29 +01:00
parent 7f17887e0e
commit 551763fecb
2 changed files with 19 additions and 3 deletions

View File

@@ -117,6 +117,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);
@@ -271,6 +278,7 @@ const BrewRenderer = (props)=>{
const handleDisplayOptionsChange = (newDisplayOptions)=>{
setDisplayOptions(newDisplayOptions);
localStorage.setItem('hb_toolbarState', JSON.stringify(newDisplayOptions));
};
const pagesStyle = {