From 7f4f8d142ac294376d7643e18fa1dd6e16dec7fe Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Thu, 24 Oct 2024 21:51:42 +0800 Subject: [PATCH] fix: tab switch --- app/(main)/[id]/page.tsx | 5 +---- components/TabSwitch.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/(main)/[id]/page.tsx b/app/(main)/[id]/page.tsx index 3646322..ac10cc9 100644 --- a/app/(main)/[id]/page.tsx +++ b/app/(main)/[id]/page.tsx @@ -5,13 +5,10 @@ import ServerDetailChartClient from "@/app/(main)/ClientComponents/ServerDetailC import ServerDetailClient from "@/app/(main)/ClientComponents/ServerDetailClient"; import TabSwitch from "@/components/TabSwitch"; import { Separator } from "@/components/ui/separator"; -import { useTranslations } from "next-intl"; import { useState } from "react"; export default function Page({ params }: { params: { id: string } }) { - const t = useTranslations("TabSwitch"); - - const tabs = [t("Detail"), t("Network")]; + const tabs = ["Detail", "Network"]; const [currentTab, setCurrentTab] = useState(tabs[0]); return (
{tab}
+{t(tab)}