Skip to content

Commit

Permalink
Handling dynamic error message when saving a new stop place.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-limyr committed Nov 28, 2024
1 parent 5c3d290 commit f787e4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/Dialogs/SaveDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class SaveDialog extends React.Component {

handleSave() {
const { handleConfirm } = this.props;
const { comment } = this.state;

let userInput = {
comment: comment,
Expand All @@ -82,9 +81,11 @@ class SaveDialog extends React.Component {
render() {
const { open, intl, handleClose, errorMessage } = this.props;
const { formatMessage } = intl;
const { isSaving, comment } = this.state;
const { isSaving } = this.state;

const errorMessageLabel = this.getErrorMessage();
const errorMessageLabel = this.getErrorMessage()
? formatMessage({ id: this.getErrorMessage() })
: "";

const translations = {
use: formatMessage({ id: "use" }),
Expand Down

0 comments on commit f787e4e

Please sign in to comment.