0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 18:48:39 +00:00

fix save on load

This commit is contained in:
Víctor Losada Hernández
2026-04-25 18:22:44 +02:00
parent c12bdcd042
commit ce2406992a
@@ -121,7 +121,15 @@ const EditPage = (props)=>{
if(autoSaveEnabled) trySave(false, hasChange);
}, [currentBrew]);
const didMount = useRef(false);
useEffect(()=>{
console.log('savegoogle has changed');
if (!didMount.current) {
didMount.current = true;
return;
}
trySave(true);
}, [saveGoogle]);