open post when double click

This commit is contained in:
srgooglo 2022-09-07 11:15:38 +02:00
parent 848ad2e125
commit 91ae6650e7

View File

@ -148,6 +148,11 @@ export default class PostsFeed extends React.Component {
return result
}
onDoubleClickPost = (data) => {
// open post
app.setLocation(`/post/${data._id}`)
}
insert = async (data) => {
await this.setState({
renderList: [this.getPostRender(data), ...this.state.renderList],
@ -173,6 +178,7 @@ export default class PostsFeed extends React.Component {
events={{
onClickLike: this.onLikePost,
onClickDelete: this.onDeletePost,
onDoubleClick: this.onDoubleClickPost,
}}
/>
}