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