mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 17:31:15 -05:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user