feat(agent-office): AgentGrid renders 9 slots from GRID_SLOTS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-17 20:57:20 +09:00
parent 3fd923400f
commit e04e2b010c

View File

@@ -0,0 +1,33 @@
// src/pages/agent-office/components/AgentGrid.jsx
import { GRID_SLOTS } from '../constants.js';
import AgentCard from './AgentCard.jsx';
import PlaceholderCard from './PlaceholderCard.jsx';
export default function AgentGrid({ agents, notifications, selectedAgent, onSelectAgent, onSelectPlaceholder }) {
return (
<div className="ao-grid">
{GRID_SLOTS.map((slot, idx) => {
if (slot.agentId === null) {
const placeholderKey = `placeholder-${idx}`;
return (
<PlaceholderCard
key={placeholderKey}
active={selectedAgent === placeholderKey}
onClick={() => onSelectPlaceholder(placeholderKey)}
/>
);
}
return (
<AgentCard
key={slot.agentId}
agentId={slot.agentId}
agentState={agents[slot.agentId]}
notificationCount={notifications[slot.agentId] || 0}
active={selectedAgent === slot.agentId}
onClick={() => onSelectAgent(slot.agentId)}
/>
);
})}
</div>
);
}