Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / components / hooks / useNotifications.tsx
blobccf016690e6c348b56ffd1a99d4c79a0dea5005a
1 import { useContext } from 'react';
3 import NotificationsContext from '../containers/notifications/notificationsContext';
5 const useNotifications = () => {
6     const manager = useContext(NotificationsContext);
8     if (!manager) {
9         throw new Error('Trying to use uninitialized NotificationsContext');
10     }
12     return manager;
15 export default useNotifications;