Make "brewToSave" prep (patch/hash/pageCount) common, and move into common hook.

This commit is contained in:
Trevor Buckner committed 2026-10-07 16:07:15 +00:00
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,