Allow monitor sort headers to reset to default

This commit is contained in:
fabiangigler committed 2026-09-23 13:35:01 +02:00
1 parent 0cb48596a0
commit 380968472f
5 files changed
+26 -29

No files matched your search

+10
View File
@@ -10,6 +10,16 @@ import {
type DockerLogLine,
} from "@/Types/Check";
export const getNextMonitorSort = (
field: string,
sortField: string,
sortOrder: "asc" | "desc"
): { field: string; order: "asc" | "desc" } => {
if (field !== sortField) return { field, order: "asc" };
if (sortOrder === "asc") return { field, order: "desc" };
return { field: "", order: "asc" };
};
export const getMonitorPath = (type: MonitorType): string => {
const pathMap: Record<MonitorType, string> = {
http: "uptime",