mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
perf(global): precomputing the map
This commit is contained in:
parent
45e5949a69
commit
b0405f177f
File diff suppressed because one or more lines are too long
@ -94,7 +94,7 @@ function Links() {
|
|||||||
|
|
||||||
// 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: () => void, delay: number | null) => {
|
const useInterval = (callback: () => void, delay: number | null) => {
|
||||||
const savedCallback = useRef<() => void>(() => { });
|
const savedCallback = useRef<() => void>(() => {});
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
savedCallback.current = callback;
|
savedCallback.current = callback;
|
||||||
});
|
});
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
import ServerList from "@/components/ServerList";
|
import ServerList from "@/components/ServerList";
|
||||||
import ServerOverview from "@/components/ServerOverview";
|
import ServerOverview from "@/components/ServerOverview";
|
||||||
|
|
||||||
export const runtime = "edge";
|
|
||||||
|
|
||||||
import { Loader } from "@/components/loading/Loader";
|
import { Loader } from "@/components/loading/Loader";
|
||||||
import { ServerStackIcon } from "@heroicons/react/20/solid";
|
import { ServerStackIcon } from "@heroicons/react/20/solid";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
@ -10,6 +7,8 @@ import { Suspense } from "react";
|
|||||||
|
|
||||||
import ServerGlobal from "./ClientComponents/Global";
|
import ServerGlobal from "./ClientComponents/Global";
|
||||||
|
|
||||||
|
export const runtime = "edge";
|
||||||
|
|
||||||
export default async function Home({
|
export default async function Home({
|
||||||
searchParams,
|
searchParams,
|
||||||
}: {
|
}: {
|
||||||
|
Loading…
Reference in New Issue
Block a user