import { useContext } from 'react';
import { ManageAldeiasContext } from './ManageAldeiasContext';

const useManageAldeiasContext = () => {
  const context = useContext(ManageAldeiasContext);

  if (!context) throw new Error('useManageAldeiasContext must be used within AuthProvider');

  return context;
};

export { useManageAldeiasContext };
