Skip to content

Commit

Permalink
fix: minor layout fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsharma82 committed Nov 23, 2024
1 parent ebb1879 commit 8a791ff
Show file tree
Hide file tree
Showing 4 changed files with 303 additions and 299 deletions.
18 changes: 18 additions & 0 deletions components/Logo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use client'

import { useEffect, useState } from 'react';
import { useTheme } from 'next-themes'

export const Logo = () => {
const [isDark, setIsDark] = useState(false);
const { resolvedTheme } = useTheme();

useEffect(() => {
setIsDark(resolvedTheme === 'dark');
}, [resolvedTheme]);

return (
// eslint-disable-next-line @next/next/no-img-element
<img width={160} src={isDark ? "/logo-dark.svg" : "/logo-light.svg"} alt="ElegantOTA" />
);
}
Loading

0 comments on commit 8a791ff

Please sign in to comment.