Files
kandev/apps/web/app/office/agents/page.tsx
T
2026-05-16 20:07:57 +01:00

19 lines
625 B
TypeScript

import { listAgentProfiles } from "@/lib/api/domains/office-api";
import { getActiveWorkspaceId } from "../lib/get-active-workspace";
import { AgentsPageClient } from "./agents-page-client";
import type { AgentProfile } from "@/lib/state/slices/office/types";
export default async function AgentsPage() {
const workspaceId = await getActiveWorkspaceId();
let agents: AgentProfile[] = [];
if (workspaceId) {
const res = await listAgentProfiles(workspaceId, { cache: "no-store" }).catch(() => ({
agents: [],
}));
agents = res.agents ?? [];
}
return <AgentsPageClient initialAgents={agents} />;
}