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

const useManageProfessionContext = () => {
  const context = useContext(ManageProfessionContext);

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

  return context;
};

export { useManageProfessionContext };
