mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-07 07:56:12 +02:00
feat: implement dark mode
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { useContext } from "react"
|
||||
import { IThemeContext, ThemeContext } from "../ThemeProvider"
|
||||
|
||||
export default function useTheme(): IThemeContext {
|
||||
const themeContext = useContext(ThemeContext)
|
||||
|
||||
if (!themeContext) {
|
||||
throw Error("Need context")
|
||||
}
|
||||
|
||||
return themeContext
|
||||
}
|
||||
Reference in New Issue
Block a user