0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 11:32:38 +00:00

only display 'off' warning if changes exist

This commit is contained in:
Gazook89
2022-10-17 21:49:50 -05:00
parent 8562d328ff
commit c56adcba76

View File

@@ -341,7 +341,7 @@ const EditPage = createClass({
</Nav.item>;
}
if(this.state.autoSaveWarning){
if(this.state.autoSaveWarning && this.hasChanges()){
this.setAutosaveWarning();
const elapsedTime = Math.round((new Date() - this.state.unsavedTime) / 1000 / 60);
const text = elapsedTime == 0 ? 'Autosave is OFF.' : `Autosave has been turned off, and you haven't saved for ${elapsedTime} minutes.`;