mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 23:44:11 +02:00
13 lines
284 B
TypeScript
13 lines
284 B
TypeScript
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
|
|
}
|