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