mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-14 09:55:55 -07:00
chore: initial public commit
This commit is contained in:
commit
fc9054b78c
250 changed files with 32809 additions and 0 deletions
10
client/app/hooks/useTheme.ts
Normal file
10
client/app/hooks/useTheme.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { useContext } from 'react';
|
||||
import { ThemeContext } from '../providers/ThemeProvider';
|
||||
|
||||
export function useTheme() {
|
||||
const context = useContext(ThemeContext);
|
||||
if (!context) {
|
||||
throw new Error('useTheme must be used within a ThemeProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue