import { useContext } from "react";
import { QuotesContext } from "./QuotesContext";

export const useQuotesContext = () => {
  const context = useContext(QuotesContext);
  if (context === null) throw new Error("useQuotes must be used within a QuotesProvider");
  return context;
};
