refactor: centralize host route builders and add dedicated new-agent route

This commit is contained in:
Mohamed Boudra
2026-03-04 15:09:06 +07:00
parent 92991ffdb8
commit f47ea7afe5
17 changed files with 231 additions and 193 deletions
@@ -1,5 +1,6 @@
import {
buildHostAgentDetailRoute,
buildHostRootRoute,
buildHostWorkspaceAgentTabRoute,
} from "@/utils/host-routes";
@@ -40,7 +41,7 @@ export function buildNotificationRoute(data: NotificationData): string {
return buildHostAgentDetailRoute(serverId, agentId);
}
if (serverId) {
return `/h/${encodeURIComponent(serverId)}`;
return buildHostRootRoute(serverId);
}
return "/";
}