mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-16 09:02:24 +03:00
post screen fester than all times
This commit is contained in:
parent
f805d2ee6c
commit
ffc04c74f3
@ -37,17 +37,16 @@ class PostCardContainer extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
_handleOnContentPress = (author, permlink) => {
|
||||
_handleOnContentPress = (content) => {
|
||||
const { navigation } = this.props;
|
||||
|
||||
if (author && permlink) {
|
||||
if (content) {
|
||||
navigation.navigate({
|
||||
routeName: ROUTES.SCREENS.POST,
|
||||
params: {
|
||||
author,
|
||||
permlink,
|
||||
content,
|
||||
},
|
||||
key: permlink,
|
||||
key: content.permlink,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ class PostCard extends Component {
|
||||
_handleOnContentPress = () => {
|
||||
const { handleOnContentPress, content } = this.props;
|
||||
|
||||
handleOnContentPress(content.author, content.permlink);
|
||||
handleOnContentPress(content);
|
||||
};
|
||||
|
||||
_handleOnVotersPress = () => {
|
||||
|
@ -25,9 +25,11 @@ class PostContainer extends Component {
|
||||
// Component Life Cycle Functions
|
||||
componentDidMount() {
|
||||
const { navigation } = this.props;
|
||||
const { author, permlink } = navigation.state && navigation.state.params;
|
||||
const { content } = navigation.state && navigation.state.params;
|
||||
|
||||
this._loadPost(author, permlink);
|
||||
if (content) {
|
||||
this.setState({ post: content });
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
|
Loading…
Reference in New Issue
Block a user