fix: fix Logo component

This commit is contained in:
javayhu 2025-04-05 14:46:59 +08:00
parent aa0aea352b
commit 43d6b2cbf7
2 changed files with 3 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -1,3 +1,5 @@
'use client';
import { websiteConfig } from '@/config';
import { cn } from '@/lib/utils';
import { useTheme } from 'next-themes';
@ -6,7 +8,7 @@ import Image from 'next/image';
export function Logo({ className }: { className?: string }) {
const theme = useTheme();
const logoLight = websiteConfig.logo.light ?? '/logo.png';
const logoDark = websiteConfig.logo.dark ?? '/logo-dark.png';
const logoDark = websiteConfig.logo.dark ?? logoLight;
const logo = theme.theme === 'dark' ? logoDark : logoLight;
return (