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 };
