13 lines
364 B
TypeScript
13 lines
364 B
TypeScript
import { useContext } from 'react';
|
|
import { ManageWalletContext } from './ManageWalletContext';
|
|
|
|
const useManageWalletContext = () => {
|
|
const context = useContext(ManageWalletContext);
|
|
if (!context) {
|
|
throw new Error('useManageWalletContext must be used within a ManageWalletContextProvider');
|
|
}
|
|
return context;
|
|
};
|
|
|
|
export { useManageWalletContext };
|