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