mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
format
This commit is contained in:
parent
6eef3480b1
commit
f0c9bbef3e
@ -40,7 +40,9 @@ export const usePlayerStateContext = (updater) => {
|
|||||||
app.cores.player.eventBus().on("player.state.update", handleStateChange)
|
app.cores.player.eventBus().on("player.state.update", handleStateChange)
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
app.cores.player.eventBus().off("player.state.update", handleStateChange)
|
app.cores.player
|
||||||
|
.eventBus()
|
||||||
|
.off("player.state.update", handleStateChange)
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
@ -71,9 +73,11 @@ export class WithPlayerContext extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <Context.Provider value={this.state}>
|
return (
|
||||||
|
<Context.Provider value={this.state}>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</Context.Provider>
|
</Context.Provider>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user