Compare commits

..

1 Commits

Author SHA1 Message Date
ab9dfff33f add files 2026-04-28 22:03:15 +02:00

View File

@ -0,0 +1,17 @@
import { createContext, useContext } from "react";
const ThemeContext = createContext(null);
function ThemeProvider({ value, children }) {
return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;
}
function useTheme() {
const context = useContext(ThemeContext);
if (!context) {
throw new Error("useTheme must be used within ThemeProvider.");
}
return context;
}
export { ThemeProvider, useTheme };