mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-19 09:42:13 +00:00
detach receiveMessage handler
This commit is contained in:
parent
4105e7eeb5
commit
a4887ce89d
1 changed files with 3 additions and 0 deletions
|
|
@ -71,6 +71,9 @@ const MetaDetails = ({ urlParams, queryParams }) => {
|
|||
}, []);
|
||||
React.useEffect(() => {
|
||||
window.addEventListener('message', receiveMessage, false);
|
||||
return () => {
|
||||
window.removeEventListener('message', receiveMessage);
|
||||
};
|
||||
}, []);
|
||||
const [inLibrary, toggleInLibrary] = useInLibrary(selectedMetaResource !== null && selectedMetaResource.content.type === 'Ready' ? selectedMetaResource.content.content : null);
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in a new issue