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

const useManageRewardContext = () => {
  const context = useContext(ManageRewardContext);

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

  return context;
};

export { useManageRewardContext };
