mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
open post when double click
This commit is contained in:
parent
7b655a9a65
commit
f1c2c38700
@ -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