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:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user