nico-martin's picture
nico-martin HF Staff
init
9b72f0d
import { useContext } from "react";
import ThemeContext from "./ThemeContext.ts";
export function useTheme() {
const context = useContext(ThemeContext);
if (context === undefined) {
throw new Error("useTheme must be used within a ThemeProvider");
}
return context;
}