-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#127 adding cancel button #213
base: master
Are you sure you want to change the base?
Conversation
Added ESLint comment rules
@@ -25,6 +26,7 @@ function ProtestForm({ | |||
editMode = null, | |||
isAdmin, | |||
}) { | |||
let history = useHistory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let history = useHistory(); | |
const history = useHistory(); |
@@ -84,6 +86,9 @@ function ProtestForm({ | |||
nearbyProtests(); | |||
}, [coordinatesUpdater]); | |||
|
|||
const onCancel = () => { | |||
history.goBack(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pardon, I take back my words about the confirmation message.
Add a confirm
dialog that says "המידע שהזנת לא יישמר. לחזור אחורה?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was prepared for that 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi - some final adjustments:
- Change the button color to red (use
tomato
). - Make sure when pressing cancel it goes to the protest page - if the user has just signed in it will return to the sign in page
Hey there, sorry but I didn't manage to figure out how user can go to the protestForm after signing in. |
They should go to the protest page; you can take the protest id from the pathname and use it to get to the protest page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @CiTRuS93, have you seen #213 (comment) ?
No description provided.