Change hook from js to jsx

This commit is contained in:
Trevor Buckner
2026-09-14 20:51:09 -04:00
parent 8086087fb4
commit 2676abe4e7
4 changed files with 7 additions and 7 deletions
@@ -30,11 +30,11 @@ export default function useCommonEditPageFunctions(dependencies) {
save,
} = dependencies;
const [isSaving, setIsSaving] = useState(false);
const [lastSavedTime, setLastSavedTime] = useState(new Date());
const [autoSaveEnabled, setAutoSaveEnabled] = useState(!sandbox);
const [isSaving , setIsSaving] = useState(false);
const [lastSavedTime , setLastSavedTime] = useState(new Date());
const [autoSaveEnabled , setAutoSaveEnabled] = useState(!sandbox);
const [warnUnsavedChanges, setWarnUnsavedChanges] = useState(true);
const [unsavedChanges, setUnsavedChanges] = useState(false);
const [unsavedChanges , setUnsavedChanges] = useState(false);
const unsavedChangesRef = useRef(unsavedChanges); // onBeforeUnload lives outside React and needs ref to unsavedChanges
const warnUnsavedTimeout = useRef(null); // timers live outside React and need ref to consistently track time