Skip to content

Commit

Permalink
fix(website): fix issue with white logo text and light mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx committed Jan 23, 2023
1 parent 45153d9 commit a237d2a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/website/components/ThemedImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ import { useTheme } from "next-themes";
import { useEffect, useState } from "react";

function ThemedImage() {
const { theme } = useTheme();
const { resolvedTheme } = useTheme();
const [src, setSrc] = useState(null);

useEffect(() => {
setSrc(
localStorage.getItem("theme") === "dark" ||
localStorage.getItem("theme") === "system" ||
localStorage.getItem("theme") === null
resolvedTheme === "dark"
? "/images/logotype-white.png"
: "/images/logotype-black.png"
);
}, [theme]);
}, [resolvedTheme]);

return src ? (
<Image
Expand Down

0 comments on commit a237d2a

Please sign in to comment.