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

const useTransactionDisbursementContext = () => {
  const context = useContext(TransactionDisbursementContext);

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

  return context;
};

export { useTransactionDisbursementContext };
