mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: remove unstable_setRequestLocale
This commit is contained in:
parent
23cb4c8cce
commit
260bbb5081
@ -7,7 +7,6 @@ import { Skeleton } from "@/components/ui/skeleton";
|
|||||||
import getEnv from "@/lib/env-entry";
|
import getEnv from "@/lib/env-entry";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { useLocale } from "next-intl";
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
@ -63,7 +62,7 @@ function Header() {
|
|||||||
|
|
||||||
// https://github.com/streamich/react-use/blob/master/src/useInterval.ts
|
// https://github.com/streamich/react-use/blob/master/src/useInterval.ts
|
||||||
const useInterval = (callback: Function, delay?: number | null) => {
|
const useInterval = (callback: Function, delay?: number | null) => {
|
||||||
const savedCallback = useRef<Function>(() => {});
|
const savedCallback = useRef<Function>(() => { });
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
savedCallback.current = callback;
|
savedCallback.current = callback;
|
||||||
});
|
});
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
import ServerList from "@/components/ServerList";
|
import ServerList from "@/components/ServerList";
|
||||||
import ServerOverview from "@/components/ServerOverview";
|
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 (
|
return (
|
||||||
<div className="mx-auto grid w-full max-w-5xl gap-4 md:gap-6">
|
<div className="mx-auto grid w-full max-w-5xl gap-4 md:gap-6">
|
||||||
<ServerOverview />
|
<ServerOverview />
|
||||||
|
Loading…
Reference in New Issue
Block a user