You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Koito/client/app/hooks/useTheme.ts

10 lines
279 B

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;
}