fix: Minor fixes to new collection sharing UI (behind flag)

This commit is contained in:
Tom Moor
2024-05-16 20:55:09 -04:00
parent cae013837b
commit 3d87a03ca6
7 changed files with 35 additions and 15 deletions

View File

@@ -100,15 +100,17 @@ export default class UsersStore extends Store<User> {
name: string;
role: UserRole;
}[]
) => {
): Promise<User[]> => {
const res = await client.post(`/users.invite`, {
invites,
});
invariant(res?.data, "Data should be available");
let response: User[] = [];
runInAction(`invite`, () => {
res.data.users.forEach(this.add);
response = res.data.users.map(this.add);
});
return res.data;
return response;
};
@action