Improve theme hook performance by removing unused dependency

Optimize useNovuTheme hook by removing the unused theme variable from the useMemo dependency array, preventing unnecessary recalculations.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 5191c2bb-cd42-429f-a7dc-1c028b81e199
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/5191c2bb-cd42-429f-a7dc-1c028b81e199/U85RZre
This commit is contained in:
pac7
2025-10-08 17:27:23 +00:00
parent 6270241109
commit fff532a191

View File

@@ -1,9 +1,6 @@
import { useTheme } from '@/components/theme/ThemeProvider';
import { useMemo } from 'react'; import { useMemo } from 'react';
export function useNovuTheme() { export function useNovuTheme() {
const { theme } = useTheme();
const appearance = useMemo(() => { const appearance = useMemo(() => {
return { return {
variables: { variables: {
@@ -171,7 +168,7 @@ export function useNovuTheme() {
}, },
}, },
} as const; } as const;
}, [theme]); }, []);
return appearance; return appearance;
} }