13 lines
369 B
TypeScript
13 lines
369 B
TypeScript
import { useContext } from 'react';
|
|
import { ManageApprovalTransactionContext } from './ApprovalTransactionContext';
|
|
|
|
const useTransactionContext = () => {
|
|
const context = useContext(ManageApprovalTransactionContext);
|
|
|
|
if (!context) throw new Error('useTransactionContext must be used within AuthProvider');
|
|
|
|
return context;
|
|
};
|
|
|
|
export { useTransactionContext };
|