13 lines
339 B
TypeScript
13 lines
339 B
TypeScript
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 };
|