AlexisTercero55 / contact-list

https://alexistercero55.github.io/contact-list/
1 stars 0 forks source link

`deleteProfile` action needs confirmation process. #10

Closed AlexisTercero55 closed 1 year ago

AlexisTercero55 commented 1 year ago

https://github.com/AlexisTercero55/contact-list/commit/fa4f0b59937a6952eff23cc301138e8bcf4913e6#r105492139

Overlay input confirmation buttons:

Delete Cancel
AlexisTercero55 commented 1 year ago

Based on

React-Bootstrap Modals

AlexisTercero55 commented 1 year ago

Trigger

https://github.com/AlexisTercero55/contact-list/blob/052960930e7c171f3c763e60cb88d6f68000b626/src/components/ProfileListItem.jsx#L110

Confirmation process

https://github.com/AlexisTercero55/contact-list/blob/052960930e7c171f3c763e60cb88d6f68000b626/src/components/ProfileListItem.jsx#L29

https://github.com/AlexisTercero55/contact-list/blob/052960930e7c171f3c763e60cb88d6f68000b626/src/components/ProfileListItem.jsx#L141

https://github.com/AlexisTercero55/contact-list/blob/052960930e7c171f3c763e60cb88d6f68000b626/src/components/ProfileListItem.jsx#L146

const deleteProfileConfirmation = (confirmation=false) => 
  {
    setShow(false);
    if(confirmation)
      dispatch({type:ProfileActions.deleteProfile, index});
  };
AlexisTercero55 commented 1 year ago

Review

Confirmation process works as expected

Image