From 646354e515e744d57fc12f5d76f8c3277f5ca787 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Tue, 21 Jan 2025 10:31:54 +0800 Subject: [PATCH] refactor: biome config --- .../ClientComponents/detail/NetworkChart.tsx | 41 +++++++++++-------- .../detail/ServerDetailChartClient.tsx | 14 +++---- .../ClientComponents/detail/ServerIPInfo.tsx | 2 +- app/(main)/footer.tsx | 2 + app/(main)/header.tsx | 8 ++-- app/(main)/layout.tsx | 2 +- app/api/detail/route.ts | 4 +- app/api/monitor/route.ts | 4 +- app/api/server-ip/route.ts | 8 ++-- app/context/network-filter-context.tsx | 2 +- app/context/server-data-context.tsx | 4 +- app/context/status-context.tsx | 2 +- app/context/tooltip-context.tsx | 2 +- app/layout.tsx | 8 ++-- biome.json | 16 +++----- components/Icon.tsx | 2 +- components/ServerCard.tsx | 6 +-- components/ServerCardInline.tsx | 6 +-- components/SignIn.tsx | 1 + components/loading/Loader.tsx | 2 +- components/loading/NetworkChartLoading.tsx | 6 +-- components/loading/ServerDetailLoading.tsx | 18 ++++---- components/ui/badge.tsx | 2 +- lib/serverFetch.tsx | 16 ++++---- lib/utils.ts | 15 ++++--- 25 files changed, 99 insertions(+), 94 deletions(-) diff --git a/app/(main)/ClientComponents/detail/NetworkChart.tsx b/app/(main)/ClientComponents/detail/NetworkChart.tsx index 007f293..a542c28 100644 --- a/app/(main)/ClientComponents/detail/NetworkChart.tsx +++ b/app/(main)/ClientComponents/detail/NetworkChart.tsx @@ -1,10 +1,10 @@ "use client" -import { NezhaAPIMonitor, ServerMonitorChart } from "@/app/types/nezha-api" +import type { NezhaAPIMonitor, ServerMonitorChart } from "@/app/types/nezha-api" import NetworkChartLoading from "@/components/loading/NetworkChartLoading" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { - ChartConfig, + type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, @@ -120,9 +120,12 @@ export const NetworkChart = React.memo(function NetworkChart({ () => chartDataKey.map((key) => (