mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
remove ws listeners
This commit is contained in:
parent
94f0219b63
commit
cc40fc7fcd
@ -200,22 +200,6 @@ export default class PostCard extends React.PureComponent {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount = () => {
|
|
||||||
app.cores.api.listenEvent(
|
|
||||||
`post.update.${this.state.data._id}`,
|
|
||||||
this.handleDataUpdate,
|
|
||||||
"posts",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount = () => {
|
|
||||||
app.cores.api.unlistenEvent(
|
|
||||||
`post.update.${this.state.data._id}`,
|
|
||||||
this.handleDataUpdate,
|
|
||||||
"posts",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<motion.article
|
<motion.article
|
||||||
|
Loading…
x
Reference in New Issue
Block a user