[Resolved] Clicking on vote notification text goes to empty screen. (#75)

This commit is contained in:
Qolzam
2018-07-16 08:54:55 +07:00
parent 6df2051650
commit d1162440bf
3 changed files with 4 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
import moment from 'moment/moment'
import _ from 'lodash'
import { Reducer, Action } from 'redux'
import { Map } from 'immutable'
import { Map, fromJS } from 'immutable'
// - Import action types
import { PostActionType } from 'constants/postActionType'
@@ -53,7 +53,7 @@ export let postReducer = (state = Map(new PostState()), action: IPostAction) =>
case PostActionType.ADD_POST:
return state
.setIn(['userPosts', payload.uid, payload.post.id], Map(payload.post))
.setIn(['userPosts', payload.uid, payload.post.id], fromJS({...payload.post}))
case PostActionType.UPDATE_POST: return updatePost(state, payload)
case PostActionType.UPDATE_POST_COMMENTS: return updatePostComments(state, payload)