fix: resolve all ESLint errors blocking CI releases
- Extract ThemeContext and ToolCollapseContext definitions into separate files to satisfy react-refresh/only-export-components rule - Move useTheme and useToolCollapse hooks to dedicated hook files - Fix empty catch block in ThemeContext (add comment) - Replace Date.now() ref in ThinkingIndicator with useState initializer - Update all imports across components Closes feedback #58
This commit is contained in:
18
src/contexts/ThemeContextDef.ts
Normal file
18
src/contexts/ThemeContextDef.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export type ThemeName = 'dark' | 'light' | 'oled';
|
||||
export type AccentColor = 'cyan' | 'violet' | 'emerald' | 'amber' | 'rose' | 'blue';
|
||||
|
||||
export interface ThemeContextValue {
|
||||
theme: ThemeName;
|
||||
accent: AccentColor;
|
||||
setTheme: (t: ThemeName) => void;
|
||||
setAccent: (a: AccentColor) => void;
|
||||
}
|
||||
|
||||
export const ThemeContext = createContext<ThemeContextValue>({
|
||||
theme: 'dark',
|
||||
accent: 'cyan',
|
||||
setTheme: () => {},
|
||||
setAccent: () => {},
|
||||
});
|
||||
Reference in New Issue
Block a user