import Image from "next/future/image"; import { Disclosure } from "@headlessui/react"; import Status from "./status"; import Widget from "./widget"; import Docker from "./widgets/service/docker"; function resolveIcon(icon) { if (icon.startsWith("http")) { return `/api/proxy?url=${encodeURIComponent(icon)}`; } if (icon.startsWith("/")) { return icon; } if (icon.endsWith(".png")) { return `https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/${icon}`; } return `https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/${icon}.png`; } export default function Item({ service }) { const handleOnClick = () => { if (service.href && service.href !== "#") { window.open(service.href, "_blank").focus(); } }; const hasLink = service.href && service.href !== "#"; return (
  • {service.icon && (hasLink ? ( ) : (
    logo
    ))} {hasLink ? ( ) : (
    {service.name}

    {service.description}

    )} {service.container && ( )}
    {service.widget && }
  • ); }