move lightrag_webui folder to top directory
This commit is contained in:
12
lightrag_webui/src/hooks/useTheme.tsx
Normal file
12
lightrag_webui/src/hooks/useTheme.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useContext } from 'react'
|
||||
import { ThemeProviderContext } from '@/components/ThemeProvider'
|
||||
|
||||
const useTheme = () => {
|
||||
const context = useContext(ThemeProviderContext)
|
||||
|
||||
if (context === undefined) throw new Error('useTheme must be used within a ThemeProvider')
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
export default useTheme
|
Reference in New Issue
Block a user