Skip to content

Commit

Permalink
fix(trip-basics-pane.js): Add warning when navigating away from unsav…
Browse files Browse the repository at this point in the history
…ed trip changes

resolve typos, remove string assembly for internationalization
  • Loading branch information
miles-grant-ibigroup committed Jul 7, 2021
1 parent f5efbc1 commit 471c3f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/components/user/monitored-trip/trip-basics-pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class TripBasicsPane extends Component {
// but don't show it when they click submit or cancel.
const unsavedChanges = dirty && !isSubmitting && !canceled
// Message changes depending on if the new or existing trip is being edited
const unsavedChangesMessage = `You have haven't saved your ${
isCreating ? 'new ' : ''
}trip yet. If you leave, ${isCreating ? 'it' : 'changes'} will be lost.`
const unsavedChangesNewTripMessage = 'You haven\'t saved your new trip yet. If you leave, it will be lost.'
const unsavedChangesExistingTripMessage = 'You haven\'t saved your trip yet. If you leave, changes will be lost.'
const unsavedChangesMessage = isCreating ? unsavedChangesNewTripMessage : unsavedChangesExistingTripMessage

if (!itinerary) {
return <div>No itinerary to display.</div>
Expand Down

0 comments on commit 471c3f4

Please sign in to comment.