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

export const useSettingsContext = () => {
  const context = useContext(SettingsContext);
  if (context === null)
    throw new Error("useSettingsContext must be used within a SettingsProvider");
  return context;
};
