Merge branch 'develop' of https://github.com/rowyio/rowy into develop

This commit is contained in:
Sidney Alcantara
2022-06-20 18:57:27 +10:00

View File

@@ -35,6 +35,9 @@ export function useSettingsDocs() {
{ updateDataAtom: updateProjectSettingsAtom }
);
const roles =
JSON.parse((currentUser as any)?.reloadUserInfo?.customAttributes ?? "{}")
?.roles ?? [];
// Store user settings in atom when a user is signed in
useFirestoreDocWithAtom(userSettingsAtom, globalScope, USERS, {
pathSegments: [currentUser?.uid],
@@ -46,6 +49,7 @@ export function useSettingsDocs() {
photoURL: currentUser.photoURL || undefined,
phoneNumber: currentUser.phoneNumber || undefined,
},
roles,
}
: undefined,
updateDataAtom: updateUserSettingsAtom,