@@ -61,13 +61,22 @@ export default function Profile() {
|
|||||||
}
|
}
|
||||||
}, [isHistorian]);
|
}, [isHistorian]);
|
||||||
|
|
||||||
// Only show full page spinner on initial load when Redux state has no cached data
|
|
||||||
if (!currentUser) {
|
if (!currentUser) {
|
||||||
return <Loading />;
|
return <Loading />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const userMetaProps: UserMetaCardProps = {
|
const userMetaProps: UserMetaCardProps = {
|
||||||
data: currentUser,
|
data: currentUser
|
||||||
|
? {
|
||||||
|
id: currentUser.id,
|
||||||
|
email: currentUser.email,
|
||||||
|
profile: currentUser.profile,
|
||||||
|
roles: currentUser.roles?.map((role) => ({
|
||||||
|
id: Number(role.id) || undefined,
|
||||||
|
name: role.name,
|
||||||
|
})),
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
status: true,
|
status: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user