biobricks/bionet-3-client

Remove previous version of alerts

Closed this issue · 1 comments

Remove AlertCard and Alert from components using them.

Components where old logic needs to be factored out:

  • ContainerDelete.jsx
  • ContainerAdd.jsx
  • ContainerEdit.jsx
  • ContainerProfile.jsx
  • LabAdd.jsx
  • LabDelete.jsx
  • LabEdit.jsx (AlertCard was imported but not being used)
  • LabList.jsx
  • LabNew.jsx
  • LabProfile.jsx

All modified logic was replaced by toast module, css and setAlert function in app.js that is being passed down as props.

To trigger an animated alertcard from child component:
this.props.setAlert(alertType, AlertMessage)
This triggers an animated toast styled as a card. Input types:
alertType: "succes", "error"
alertMessage: "Any string value"