Direct Messages can use redux for creating new DM channels

This commit is contained in:
2019-11-19 19:04:25 -05:00
parent 297619cacb
commit 3d9266778d
6 changed files with 314 additions and 144 deletions

View File

@@ -0,0 +1,17 @@
import {SET_DIRECT_MESSAGES, SET_USERNAME_VALID, SET_USERNAME_INVALID} from '../types';
const initialState = {
directMessages: null,
};
export default function(state = initialState, action) {
switch(action.type) {
case SET_DIRECT_MESSAGES:
return {
...state,
directMessages: action.payload
};
default:
return state;
}
}