Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

299 B
Raw Blame
import { useContext } from "react";

import { ThemeProviderContext } from "./theme-context";

export const useTheme = () => {
  const context = useContext(ThemeProviderContext);

  if (context === undefined)
    throw new Error("useTheme must be used within a ThemeProvider");

  return context;
};