Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / components / hooks / useEventManager.ts
blob1ed978cf4817d0ef3dd0766d9827beaa8ad6afa3
1 import { useContext } from 'react';
3 import Context from '../containers/eventManager/context';
5 function useEventManager() {
6     const eventManager = useContext(Context);
8     if (!eventManager) {
9         throw new Error('Trying to use uninitialized EventManagerContext');
10     }
12     return eventManager;
15 export default useEventManager;