mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 07:56:50 +00:00
Make "brewToSave" prep (patch/hash/pageCount) common, and move into common hook.
This commit is contained in:
1 parent
829c82cb72
commit
2dc088cd80
4 files changed
+16
-33
No files matched your search
@@ -26,8 +26,6 @@ const HomePage =(props)=>{
|
||||
const [saveGoogle, setSaveGoogle] = useState(global.account?.googleId ? true : false);
|
||||
const [error, setError] = useState(undefined);
|
||||
|
||||
const lastSavedBrew = useRef(_.cloneDeep(props.brew));
|
||||
|
||||
const save = async (brew, saveToGoogle)=>{
|
||||
const res = await request
|
||||
.post(`/api${saveGoogle ? '?saveToGoogle=true' : ''}`)
|
||||
@@ -58,7 +56,6 @@ const HomePage =(props)=>{
|
||||
useLocalStorage,
|
||||
sandbox,
|
||||
showFloatingButtons,
|
||||
lastSavedBrew,
|
||||
save,
|
||||
onSaveSuccess,
|
||||
pageName,
|
||||
|
||||
Reference in new issue
Block a user