13 lines
361 B
TypeScript
13 lines
361 B
TypeScript
import { useContext } from 'react';
|
|
import { ManageNotifContext } from './ManageNotificationContext';
|
|
|
|
const useManageNotificationContext = () => {
|
|
const context = useContext(ManageNotifContext);
|
|
|
|
if (!context) throw new Error('useManageNotificationContext must be used within AuthProvider');
|
|
|
|
return context;
|
|
};
|
|
|
|
export { useManageNotificationContext };
|