perf(global): precomputing the map

This commit is contained in:
hamster1963 2024-11-20 09:55:16 +08:00
parent 45e5949a69
commit b0405f177f
3 changed files with 7 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -94,7 +94,7 @@ function Links() {
// https://github.com/streamich/react-use/blob/master/src/useInterval.ts
const useInterval = (callback: () => void, delay: number | null) => {
const savedCallback = useRef<() => void>(() => { });
const savedCallback = useRef<() => void>(() => {});
useEffect(() => {
savedCallback.current = callback;
});

View File

@ -1,8 +1,5 @@
import ServerList from "@/components/ServerList";
import ServerOverview from "@/components/ServerOverview";
export const runtime = "edge";
import { Loader } from "@/components/loading/Loader";
import { ServerStackIcon } from "@heroicons/react/20/solid";
import Link from "next/link";
@ -10,6 +7,8 @@ import { Suspense } from "react";
import ServerGlobal from "./ClientComponents/Global";
export const runtime = "edge";
export default async function Home({
searchParams,
}: {