0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

rename handleAutoSave to toggleAutoSave

This commit is contained in:
Trevor Buckner
2025-09-08 23:18:25 -04:00
parent 883f59ff0d
commit 90a81237ec

View File

@@ -332,7 +332,7 @@ const EditPage = (props) => {
return <Nav.item className='save saved'>saved.</Nav.item>;
};
const handleAutoSave = () => {
const toggleAutoSave = () => {
if (warningTimer.current) clearTimeout(warningTimer.current);
localStorage.setItem('AUTOSAVE_ON', JSON.stringify(!autoSaveEnabled));
setAutoSaveEnabled(!autoSaveEnabled);
@@ -345,7 +345,7 @@ const EditPage = (props) => {
};
const renderAutoSaveButton = () => (
<Nav.item onClick={handleAutoSave}>
<Nav.item onClick={toggleAutoSave}>
Autosave <i className={autoSaveEnabled ? 'fas fa-power-off active' : 'fas fa-power-off'}></i>
</Nav.item>
);