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
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDoubleClickPost = (data) => {
|
||||||
|
// open post
|
||||||
|
app.setLocation(`/post/${data._id}`)
|
||||||
|
}
|
||||||
|
|
||||||
insert = async (data) => {
|
insert = async (data) => {
|
||||||
await this.setState({
|
await this.setState({
|
||||||
renderList: [this.getPostRender(data), ...this.state.renderList],
|
renderList: [this.getPostRender(data), ...this.state.renderList],
|
||||||
@ -173,6 +178,7 @@ export default class PostsFeed extends React.Component {
|
|||||||
events={{
|
events={{
|
||||||
onClickLike: this.onLikePost,
|
onClickLike: this.onLikePost,
|
||||||
onClickDelete: this.onDeletePost,
|
onClickDelete: this.onDeletePost,
|
||||||
|
onDoubleClick: this.onDoubleClickPost,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user