add crud provider
This commit is contained in:
12
src/pages/master/provider/hooks/useManageProviderContext.tsx
Normal file
12
src/pages/master/provider/hooks/useManageProviderContext.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
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 };
|
||||
Reference in New Issue
Block a user