Add ThemeProvider

This commit is contained in:
Alex Gleason committed 2025-05-30 22:38:23 +02:00
1 parent e0d94fae71
commit a6eeb05d6e
6 files changed
+163 -11

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { useContext } from "react"
import { ThemeProviderContext } from "@/lib/theme-context"
export const useTheme = () => {
const context = useContext(ThemeProviderContext)
if (context === undefined)
throw new Error("useTheme must be used within a ThemeProvider")
return context
}