mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
update: adjust the refreshInterval
This commit is contained in:
parent
73700477ed
commit
5dbf12b983
@ -6,7 +6,7 @@ import useSWR from "swr";
|
||||
|
||||
export default function ServerListClient() {
|
||||
const { data } = useSWR('/api/server', nezhaFetcher, {
|
||||
refreshInterval: 2000,
|
||||
refreshInterval: 3000,
|
||||
});
|
||||
if (!data) return null;
|
||||
const sortedResult = data.result.sort((a: any, b: any) => a.id - b.id);
|
||||
|
@ -8,7 +8,9 @@ import { formatBytes, nezhaFetcher } from "@/lib/utils";
|
||||
import { Loader } from "@/components/loading/Loader";
|
||||
|
||||
export default function ServerOverviewClient() {
|
||||
const { data } = useSWR('/api/server', nezhaFetcher);
|
||||
const { data } = useSWR('/api/server', nezhaFetcher, {
|
||||
refreshInterval: 30000
|
||||
});
|
||||
|
||||
return (
|
||||
<section className="grid md:grid-cols-4 gap-4 grid-cols-2">
|
||||
|
Loading…
Reference in New Issue
Block a user