codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
25 stars 24 forks source link

Use snackbar to display new message notifications #496

Closed rioredwards closed 8 months ago

rioredwards commented 8 months ago

This PR:

Resolves #495

1. Removes internal success and error states and associated JSX elements from the NewMessageModal component. 2. Removes successTimeout state from NewMessageModal component. 3. Send success and error statuses for new messages to the existing notification context, which displays the messages as MUI snackbars. This is consistent with the way notifications are displayed elsewhere throughout the app.

Screenshots (if applicable):

PASS_New_Message_Error_Screenshot PASS_New_Message_Success_Screenshot
andycwilliams commented 8 months ago

With recent changes there's now a merge conflict in NewMessageModal.jsx so it should be good once that's resolved. It can even be done directly from this page.