* Fixed copyright date * Removed unnecessary components folder from channel scene * Added initial version of post textbox * Moved getTheme into a proper selector * Moved ChannelHeader into its own component * Flipped post list so that the most recent posts appear at the bottom * Moved post textbox value into redux view store * Switched new components from PureRenderMixin to React.PureComponent
24 lines
566 B
JavaScript
24 lines
566 B
JavaScript
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import {createSelector} from 'reselect';
|
|
|
|
export function getCurrentUserId(state) {
|
|
return state.entities.users.currentId;
|
|
}
|
|
|
|
export function getUsers(state) {
|
|
return state.entities.users.profiles;
|
|
}
|
|
|
|
export const getCurrentUser = createSelector(
|
|
getUsers,
|
|
getCurrentUserId,
|
|
(profiles, currentUserId) => {
|
|
return profiles[currentUserId];
|
|
}
|
|
);
|
|
|
|
export function getUser(state, id) {
|
|
return state.entities.users.profiles[id];
|
|
}
|