fix: header link

This commit is contained in:
hamster1963
2024-11-30 22:18:04 +08:00
parent 4e34bcf239
commit 48b2d1493a
14 changed files with 41 additions and 83 deletions

View File

@@ -57,10 +57,10 @@ export default function Servers() {
const totalServers = nezhaWsData?.servers?.length || 0;
const onlineServers =
nezhaWsData?.servers?.filter((server) => formatNezhaInfo(server).online)
nezhaWsData?.servers?.filter((server) => formatNezhaInfo(nezhaWsData.now,server).online)
?.length || 0;
const offlineServers =
nezhaWsData?.servers?.filter((server) => !formatNezhaInfo(server).online)
nezhaWsData?.servers?.filter((server) => !formatNezhaInfo(nezhaWsData.now,server).online)
?.length || 0;
const up =
nezhaWsData?.servers?.reduce(
@@ -112,7 +112,7 @@ export default function Servers() {
{showServices && <ServiceTracker />}
<section className="grid grid-cols-1 gap-2 md:grid-cols-2 mt-6">
{filteredServers.map((serverInfo) => (
<ServerCard key={serverInfo.id} serverInfo={serverInfo} />
<ServerCard now={nezhaWsData.now} key={serverInfo.id} serverInfo={serverInfo} />
))}
</section>
</div>