Implemented actions alerts at the AddressContainer level
My aim with this MR was to have a message displayed above the table at each action (new, edit, delete) result (see #255 (comment 77436)):
It is a bit tricky as actions are shared between the table itself (delete) and the form that is a separated component with separate routes (new, edit).
I solved this by using a two-fold mechanism:
- The table updates the message thanks to a
setState
of theAddressContainer
component - The form updates the message by redirecting to the container (with react-router's
Redirect
) with informations in the location state.
The setState
triggers a double rendering of the AddressContainer but I expect this to be fixed when moving to rest-hooks.