mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-05-07 16:38:38 +00:00
fix save on load
This commit is contained in:
@@ -121,7 +121,15 @@ const EditPage = (props)=>{
|
|||||||
if(autoSaveEnabled) trySave(false, hasChange);
|
if(autoSaveEnabled) trySave(false, hasChange);
|
||||||
}, [currentBrew]);
|
}, [currentBrew]);
|
||||||
|
|
||||||
|
const didMount = useRef(false);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
|
console.log('savegoogle has changed');
|
||||||
|
if (!didMount.current) {
|
||||||
|
didMount.current = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
trySave(true);
|
trySave(true);
|
||||||
}, [saveGoogle]);
|
}, [saveGoogle]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user