2025-05-05 17:27:36 +08:00
|
|
|
'use client';
|
2025-04-16 04:45:46 +08:00
|
|
|
|
2025-05-05 17:27:36 +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() {
|
2025-05-05 17:27:36 +08:00
|
|
|
const { theme } = useTheme();
|
|
|
|
const [mounted, setMounted] = useState(false);
|
|
|
|
|
2025-04-16 08:04:04 +08:00
|
|
|
// After mount, we can access the theme
|
|
|
|
useEffect(() => {
|
2025-05-05 17:27:36 +08:00
|
|
|
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>
|
2025-05-05 17:27:36 +08:00
|
|
|
);
|
|
|
|
}
|