* 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
23 lines
528 B
JavaScript
23 lines
528 B
JavaScript
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import {combineReducers} from 'redux';
|
|
|
|
import {ViewTypes} from 'app/constants';
|
|
|
|
import {ChannelTypes} from 'service/constants';
|
|
|
|
function postDraft(state = '', action) {
|
|
switch (action.type) {
|
|
case ViewTypes.POST_DRAFT_CHANGED:
|
|
return action.postDraft;
|
|
case ChannelTypes.SELECT_CHANNEL:
|
|
return '';
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
|
|
export default combineReducers({
|
|
postDraft
|
|
});
|