fix: fetching game/grpc/websocket as well for statusPage

This commit is contained in:
mannilakash committed 2026-03-17 15:14:44 -04:00
1 parent 622446c308
commit 115fcc67f6
1 file changed
+9 -3
+9 -3
View File
@@ -54,9 +54,15 @@ const CreateStatusPage = () => {
isCreate ? null : `/status-page/${url}?type=uptime&type=infrastructure`
);
const { data: monitorsResponse } = useGet<Monitor[]>(
"/monitors/team?type=http&type=ping&type=port&type=docker&type=hardware"
);
const monitorsUrl = useMemo(() => {
const params = new URLSearchParams();
["http", "ping", "port", "docker", "game", "grpc", "websocket", "hardware"].forEach(
(type) => params.append("type", type)
);
return `/monitors/team?${params.toString()}`;
}, []);
const { data: monitorsResponse } = useGet<Monitor[]>(monitorsUrl);
const monitors = monitorsResponse ?? [];
const { post, loading: isSubmittingPost } = usePost();