mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 14:26:54 +00:00
fix save on load
This commit is contained in:
1 parent
c12bdcd042
commit
ce2406992a
1 file changed
+8
@@ -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