0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-01 17:22:42 +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>; return <Nav.item className='save saved'>saved.</Nav.item>;
}; };
const handleAutoSave = () => { const toggleAutoSave = () => {
if (warningTimer.current) clearTimeout(warningTimer.current); if (warningTimer.current) clearTimeout(warningTimer.current);
localStorage.setItem('AUTOSAVE_ON', JSON.stringify(!autoSaveEnabled)); localStorage.setItem('AUTOSAVE_ON', JSON.stringify(!autoSaveEnabled));
setAutoSaveEnabled(!autoSaveEnabled); setAutoSaveEnabled(!autoSaveEnabled);
@@ -345,7 +345,7 @@ const EditPage = (props) => {
}; };
const renderAutoSaveButton = () => ( const renderAutoSaveButton = () => (
<Nav.item onClick={handleAutoSave}> <Nav.item onClick={toggleAutoSave}>
Autosave <i className={autoSaveEnabled ? 'fas fa-power-off active' : 'fas fa-power-off'}></i> Autosave <i className={autoSaveEnabled ? 'fas fa-power-off active' : 'fas fa-power-off'}></i>
</Nav.item> </Nav.item>
); );