Fix SSE route dependency and align architecture docs
This commit is contained in:
11
frontend/src/contexts/useTheme.ts
Normal file
11
frontend/src/contexts/useTheme.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useContext } from 'react';
|
||||
|
||||
import { ThemeContext, type ThemeContextValue } from './theme-context';
|
||||
|
||||
export function useTheme(): ThemeContextValue {
|
||||
const context = useContext(ThemeContext);
|
||||
if (!context) {
|
||||
throw new Error('useTheme must be used within a ThemeProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in New Issue
Block a user