feat: net transfer badge

This commit is contained in:
hamster1963
2024-11-30 22:26:13 +08:00
parent 48b2d1493a
commit 3f0c2ed39d
8 changed files with 61 additions and 48 deletions

View File

@@ -4,10 +4,11 @@ import ServerFlag from "@/components/ServerFlag";
import { Badge } from "@/components/ui/badge";
import { Card, CardContent } from "@/components/ui/card";
import { useWebSocketContext } from "@/hooks/use-websocket-context";
import { cn, formatBytes, formatNezhaInfo } from "@/lib/utils";
import { cn, formatNezhaInfo } from "@/lib/utils";
import { NezhaWebsocketResponse } from "@/types/nezha-api";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { formatBytes } from "@/lib/format";
export default function ServerDetailOverview({
server_id,
@@ -37,7 +38,10 @@ export default function ServerDetailOverview({
return <ServerDetailLoading />;
}
const { name, online, uptime, version } = formatNezhaInfo(nezhaWsData.now,server);
const { name, online, uptime, version } = formatNezhaInfo(
nezhaWsData.now,
server,
);
return (
<div>