[Resolved] Clicking on vote notification text goes to empty screen. (#75)
This commit is contained in:
@@ -3,7 +3,7 @@ import React, { Component } from 'react'
|
|||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { getTranslate, getActiveLanguage } from 'react-localize-redux'
|
import { getTranslate, getActiveLanguage } from 'react-localize-redux'
|
||||||
import { Map } from 'immutable'
|
import { Map, List as ImuList } from 'immutable'
|
||||||
|
|
||||||
import { Card, CardActions, CardHeader, CardMedia, CardContent } from '@material-ui/core'
|
import { Card, CardActions, CardHeader, CardMedia, CardContent } from '@material-ui/core'
|
||||||
import ListItemText from '@material-ui/core/ListItemText'
|
import ListItemText from '@material-ui/core/ListItemText'
|
||||||
@@ -254,7 +254,7 @@ export class PostWriteComponent extends Component<IPostWriteComponentProps, IPos
|
|||||||
}
|
}
|
||||||
} else { // In edit status we pass post to update functions
|
} else { // In edit status we pass post to update functions
|
||||||
const updatedPost = postModel!.set('body', postText)
|
const updatedPost = postModel!.set('body', postText)
|
||||||
.set('tags', tags)
|
.set('tags', ImuList(tags))
|
||||||
.set('image', image)
|
.set('image', image)
|
||||||
.set('imageFullPath', imageFullPath)
|
.set('imageFullPath', imageFullPath)
|
||||||
.set('disableComments', disableComments)
|
.set('disableComments', disableComments)
|
||||||
|
|||||||
@@ -189,9 +189,6 @@ export class ShareDialogComponent extends Component<IShareDialogComponentProps,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Map dispatch to props
|
* Map dispatch to props
|
||||||
* @param {func} dispatch is the function to dispatch action to reducers
|
|
||||||
* @param {object} ownProps is the props belong to component
|
|
||||||
* @return {object} props of component
|
|
||||||
*/
|
*/
|
||||||
const mapDispatchToProps = (dispatch: any, ownProps: IShareDialogComponentProps) => {
|
const mapDispatchToProps = (dispatch: any, ownProps: IShareDialogComponentProps) => {
|
||||||
return {
|
return {
|
||||||
@@ -201,9 +198,6 @@ const mapDispatchToProps = (dispatch: any, ownProps: IShareDialogComponentProps)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Map state to props
|
* Map state to props
|
||||||
* @param {object} state is the obeject from redux store
|
|
||||||
* @param {object} ownProps is the props belong to component
|
|
||||||
* @return {object} props of component
|
|
||||||
*/
|
*/
|
||||||
const mapStateToProps = (state: any, ownProps: IShareDialogComponentProps) => {
|
const mapStateToProps = (state: any, ownProps: IShareDialogComponentProps) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import moment from 'moment/moment'
|
import moment from 'moment/moment'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import { Reducer, Action } from 'redux'
|
import { Reducer, Action } from 'redux'
|
||||||
import { Map } from 'immutable'
|
import { Map, fromJS } from 'immutable'
|
||||||
|
|
||||||
// - Import action types
|
// - Import action types
|
||||||
import { PostActionType } from 'constants/postActionType'
|
import { PostActionType } from 'constants/postActionType'
|
||||||
@@ -53,7 +53,7 @@ export let postReducer = (state = Map(new PostState()), action: IPostAction) =>
|
|||||||
|
|
||||||
case PostActionType.ADD_POST:
|
case PostActionType.ADD_POST:
|
||||||
return state
|
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: return updatePost(state, payload)
|
||||||
case PostActionType.UPDATE_POST_COMMENTS: return updatePostComments(state, payload)
|
case PostActionType.UPDATE_POST_COMMENTS: return updatePostComments(state, payload)
|
||||||
|
|||||||
Reference in New Issue
Block a user