A few screens were taking data like User or Project.
This means that if you were viewing the screen, a pull happened that deleted the data, the screen might not update and might cause errors.
Make them take userId or projectId, and retrieve the corresponding data from redux.
AddUserToProjectRoleScreen: took a User who maybe at that point had not been added to the cached set of users in redux's accountSlice. So this change will add a user to the users set after the prior screen first retrieves their info from the backend -- an intermediate part of the "Add user to project" flow -- instead of at the end of the flow.
Description
A few screens were taking data like User or Project. This means that if you were viewing the screen, a pull happened that deleted the data, the screen might not update and might cause errors. Make them take userId or projectId, and retrieve the corresponding data from redux.
AddUserToProjectRoleScreen: took a User who maybe at that point had not been added to the cached set of users in redux's accountSlice. So this change will add a user to the
users
set after the prior screen first retrieves their info from the backend -- an intermediate part of the "Add user to project" flow -- instead of at the end of the flow.Related Issues
Addresses #2289