chore: remove cashed
This commit is contained in:
10
frontend/src/hooks/useTheme.ts
Normal file
10
frontend/src/hooks/useTheme.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useContext } from 'react'
|
||||
import { ThemeContext } from '../context/ThemeContextValue'
|
||||
|
||||
export function useTheme() {
|
||||
const context = useContext(ThemeContext)
|
||||
if (context === undefined) {
|
||||
throw new Error('useTheme must be used within a ThemeProvider')
|
||||
}
|
||||
return context
|
||||
}
|
||||
Reference in New Issue
Block a user