suna/frontend/src/components/sidebar/kortix-logo.tsx

28 lines
631 B
TypeScript
Raw Normal View History

'use client';
2025-04-16 04:45:46 +08:00
import Image from 'next/image';
import { useTheme } from 'next-themes';
import { useEffect, useState } from 'react';
2025-04-16 04:45:46 +08:00
export function KortixLogo() {
const { theme } = useTheme();
const [mounted, setMounted] = useState(false);
2025-04-16 08:04:04 +08:00
// After mount, we can access the theme
useEffect(() => {
setMounted(true);
}, []);
2025-04-16 04:45:46 +08:00
return (
2025-04-16 15:16:38 +08:00
<div className="flex h-6 w-6 items-center justify-center flex-shrink-0">
2025-04-16 04:45:46 +08:00
<Image
src="/kortix-symbol.svg"
alt="Kortix"
width={24}
height={24}
2025-04-16 08:04:04 +08:00
className={`${mounted && theme === 'dark' ? 'invert' : ''}`}
2025-04-16 04:45:46 +08:00
/>
</div>
);
}