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