mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
Merge branch 'develop' of https://github.com/rowyio/rowy into develop
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user