Consolidate ThemeProvider and AppProvider

This commit is contained in:
Alex Gleason committed 2025-06-04 09:42:53 -05:00
1 parent bce7af2e76
commit c3310ab485
7 files changed
+199 -145

No files matched your search

+3 -10
View File
@@ -1,13 +1,6 @@
import { useContext } from "react"
import { ThemeContext, type ThemeContextType } from "@/lib/ThemeContext"
import { useTheme as useThemeFromProvider } from "@/components/AppProvider";
/** Hook to get and set the active theme. */
export function useTheme(): ThemeContextType {
const context = useContext(ThemeContext);
if (!context) {
throw new Error("useTheme must be used within a ThemeProvider");
}
return context;
export function useTheme() {
return useThemeFromProvider();
}