This commit is contained in:
SrGooglo 2025-02-19 16:32:52 +00:00
parent 6eef3480b1
commit f0c9bbef3e

View File

@ -40,7 +40,9 @@ export const usePlayerStateContext = (updater) => {
app.cores.player.eventBus().on("player.state.update", handleStateChange)
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() {
return <Context.Provider value={this.state}>
return (
<Context.Provider value={this.state}>
{this.props.children}
</Context.Provider>
)
}
}