import { useContext } from 'react';
import {ManageCurrencyContextProvider } from './ManageCurrencyContext';
import { ManageCurrencyContext } from '../hooks/ManageCurrencyContext';

const useManageCurrencyContext = () => {
  const context = useContext(ManageCurrencyContext);

  if (!context) throw new Error('useManageCurrencyContext must be used within AuthProvider');

  return context;
};

export { useManageCurrencyContext };
