From b2760307e4da6d7f783548ba8be267de501e96b3 Mon Sep 17 00:00:00 2001 From: muerwre Date: Wed, 6 Feb 2019 14:28:32 +0700 Subject: [PATCH] fix save button should not react to clicks --- src/components/panels/EditorPanel.jsx | 5 ++++- src/index.js | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/panels/EditorPanel.jsx b/src/components/panels/EditorPanel.jsx index cf9619d..24b01cb 100644 --- a/src/components/panels/EditorPanel.jsx +++ b/src/components/panels/EditorPanel.jsx @@ -65,7 +65,10 @@ class Component extends React.PureComponent { startProviderMode = () => this.props.setMode(MODES.PROVIDER); startTrashMode = () => this.props.setMode(MODES.TRASH); startLogoMode = () => this.props.setMode(MODES.LOGO); - startSaveMode = () => this.props.setMode(MODES.SAVE); + startSaveMode = () => { + if (!this.props.changed) return; + this.props.setMode(MODES.SAVE); + }; render() { const { diff --git a/src/index.js b/src/index.js index 8f318d8..6a7ec03 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,5 @@ /* - - todo fix save button should not react to clicks todo fix loaded stickers has wrong text placement for right-sided captions todo save spinner todo cancelling editing someone's else map return back to it's original address /razminochnyj/ @@ -30,6 +28,9 @@ todo maybe: map preview on save + OBLIVION STARTS HERE: + + done fix save button should not react to clicks done stickers with empty text should not have blackbox at view mode done add ability to copy-paste address after saving