From 23cb4c8cceb6709ae00eeafd5bfc0f84e65e4129 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Thu, 24 Oct 2024 21:39:48 +0800 Subject: [PATCH 1/2] update: version 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dfda07a..b1d8f9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nezha-dash", - "version": "0.8.0", + "version": "1.0.0", "private": true, "scripts": { "dev": "next dev -p 3020", From 260bbb508104a0d709bd3d5059c79c78edecf319 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Thu, 24 Oct 2024 21:42:23 +0800 Subject: [PATCH 2/2] fix: remove unstable_setRequestLocale --- app/(main)/header.tsx | 3 +-- app/(main)/page.tsx | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/(main)/header.tsx b/app/(main)/header.tsx index 2a1c1a7..015a4dc 100644 --- a/app/(main)/header.tsx +++ b/app/(main)/header.tsx @@ -7,7 +7,6 @@ import { Skeleton } from "@/components/ui/skeleton"; import getEnv from "@/lib/env-entry"; import { DateTime } from "luxon"; import { useTranslations } from "next-intl"; -import { useLocale } from "next-intl"; import Image from "next/image"; import { useRouter } from "next/navigation"; import React, { useEffect, useRef, useState } from "react"; @@ -63,7 +62,7 @@ function Header() { // https://github.com/streamich/react-use/blob/master/src/useInterval.ts const useInterval = (callback: Function, delay?: number | null) => { - const savedCallback = useRef(() => {}); + const savedCallback = useRef(() => { }); useEffect(() => { savedCallback.current = callback; }); diff --git a/app/(main)/page.tsx b/app/(main)/page.tsx index 0e568e6..1d7ce9f 100644 --- a/app/(main)/page.tsx +++ b/app/(main)/page.tsx @@ -1,14 +1,7 @@ import ServerList from "@/components/ServerList"; import ServerOverview from "@/components/ServerOverview"; -import { unstable_setRequestLocale } from "next-intl/server"; - -export default function Home({ - params: { locale }, -}: { - params: { locale: string }; -}) { - unstable_setRequestLocale(locale); +export default function Home() { return (