Open dzintars opened 4 years ago
export const getCurrentUser = createSelector(
getCurrentUserId,
(state) => state.entities.users.profiles,
(currentUserId, profiles) => {
if (!profiles.hasOwnProperty(currentUserId)) {
// Current user not found
return {};
}
return profiles[currentUserId];
}
);
https://developers.mattermost.com/contribute/redux/selectors/
If there is no modules of the given app ID, there is an error. https://github.com/dzintars/front/blob/13e9e98241e65e27f5a4a27aaaf022e183d49de1/src/store/features/app-navigation/selectors.ts#L19