From 4e669a6b751c0a5900459d4a9c9d41280a63729a Mon Sep 17 00:00:00 2001 From: Krishav Raj Singh Date: Sat, 5 Jul 2025 02:26:08 +0530 Subject: [PATCH] fix icon theme if theme is system --- frontend/src/components/sidebar/kortix-logo.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/sidebar/kortix-logo.tsx b/frontend/src/components/sidebar/kortix-logo.tsx index efef9c83..28f9d318 100644 --- a/frontend/src/components/sidebar/kortix-logo.tsx +++ b/frontend/src/components/sidebar/kortix-logo.tsx @@ -8,7 +8,7 @@ interface KortixLogoProps { size?: number; } export function KortixLogo({ size = 24 }: KortixLogoProps) { - const { theme } = useTheme(); + const { theme, systemTheme } = useTheme(); const [mounted, setMounted] = useState(false); // After mount, we can access the theme @@ -16,13 +16,17 @@ export function KortixLogo({ size = 24 }: KortixLogoProps) { setMounted(true); }, []); + const shouldInvert = mounted && ( + theme === 'dark' || (theme === 'system' && systemTheme === 'dark') + ); + return ( Kortix ); }