Skip to content

Instantly share code, notes, and snippets.

@jdorfman
Created November 18, 2019 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdorfman/962fd743daae32323810e9b187c624a8 to your computer and use it in GitHub Desktop.
Save jdorfman/962fd743daae32323810e9b187c624a8 to your computer and use it in GitHub Desktop.
React.useEffect(() => {
const handler = event => {
if (event.detail.status === 'no-advertiser') {
setCodeFundOut(true);
}
};
window.addEventListener('codefund', handler);
return () => {
window.removeEventListener('codefund', handler);
};
}, []);
// The MIT License (MIT) Copyright (c) 2014 Call-Em-All
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment