mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-09-20 02:00:15 +00:00
Implement scroll position management for navigation (#73)
* feat: implement scroll position management for main page navigation * fix: import saveMainPageScrollPosition in ServerCard and ServerCardInline components * feat: save scroll position when navigating to server from DashCommand * fix: prevent restoring stale scroll positions without main page origin
This commit is contained in:
@@ -34,7 +34,7 @@ export function ServiceTracker({ serverList }: { serverList: NezhaServer[] }) {
|
||||
const totalChecks =
|
||||
serviceData.up.reduce((a, b) => a + b, 0) +
|
||||
serviceData.down.reduce((a, b) => a + b, 0);
|
||||
const uptime = (totalUp / totalChecks) * 100;
|
||||
const uptime = totalChecks > 0 ? (totalUp / totalChecks) * 100 : 0;
|
||||
|
||||
const avgDelay =
|
||||
serviceData.delay.length > 0
|
||||
|
||||
Reference in New Issue
Block a user