add favicon + fix light mode logos (#264)

This commit is contained in:
Anmol
2025-05-17 21:53:08 -07:00
committed by GitHub
parent a8d3daa407
commit f1db2a4cb3
8 changed files with 38 additions and 7 deletions

View File

@@ -31,6 +31,7 @@ import {
Terminal,
} from "lucide-react";
import { motion } from "motion/react";
import { useTheme } from "next-themes";
import Image from "next/image";
import Link from "next/link";
import { useQueryStates } from "nuqs";
@@ -152,7 +153,23 @@ const TechIcon: React.FC<{
name: string;
className?: string;
}> = ({ icon, name, className }) => {
if (icon.startsWith("/icon/")) {
const [mounted, setMounted] = useState(false);
const { theme } = useTheme();
useEffect(() => {
setMounted(true);
}, []);
if (mounted && icon.startsWith("/icon/")) {
if (
theme === "light" &&
(icon.includes("drizzle") ||
icon.includes("prisma") ||
icon.includes("express"))
) {
icon = icon.replace(".svg", "-light.svg");
}
return (
<Image
src={icon}