mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
open post when double click
This commit is contained in:
parent
848ad2e125
commit
91ae6650e7
@ -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,
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user