"use client"; import { Card, CardContent } from "@/components/ui/card"; import blogMan from "@/public/blog-man.webp"; import Image from "next/image"; import useSWR from "swr"; import { formatBytes, nezhaFetcher } from "@/lib/utils"; import { Loader } from "@/components/loading/Loader"; import { ServerApi } from "@/app/types/nezha-api"; import MotionNumber from "motion-number"; export default function ServerOverviewClient() { const { data } = useSWR("/api/server", nezhaFetcher); const disableCartoon = process.env.NEXT_PUBLIC_DisableCartoon === "true"; return (

Total servers

{data ? (
) : (
)}

Online servers

{data ? (
) : (
)}

Offline servers

{data ? (
) : (
)}

Total bandwidth

{data ? (

{formatBytes(data?.total_bandwidth)}

) : (
)}
{!disableCartoon && ( {"Hamster1963"} )}
); }