Refactor image loading and theme handling in page.tsx

This commit is contained in:
Bram Suurd
2024-05-01 20:28:48 +02:00
parent 2e81c18dff
commit ccfd100c4c

View File

@@ -4,18 +4,8 @@ import Link from "next/link";
import React from "react";
import Image from "next/image";
import { Typewriter } from "react-simple-typewriter";
import { useTheme } from "next-themes";
const { theme, resolvedTheme } = useTheme();
const isLight = theme === "light" || resolvedTheme === "light";
const imageUrl = isLight
? "https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/proxmox.png"
: "https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/png/proxmox-light.png";
function page() {
return (
<div className="">
<div className="flex h-screen items-center justify-center gap-48">