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

const useUserContext = () => {
  const context = useContext(ManageUserContext);

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

  return context;
};

export { useUserContext };
