feat(web): MS23-P2-002 OrchestratorPanel SSE stream component
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
This commit is contained in:
@@ -4,14 +4,24 @@ import { OrchestratorPanel } from "@/components/mission-control/OrchestratorPane
|
||||
|
||||
interface MissionControlPanelProps {
|
||||
panels: readonly string[];
|
||||
panelSessionIds?: readonly (string | undefined)[];
|
||||
}
|
||||
|
||||
export function MissionControlPanel({ panels }: MissionControlPanelProps): React.JSX.Element {
|
||||
export function MissionControlPanel({
|
||||
panels,
|
||||
panelSessionIds,
|
||||
}: MissionControlPanelProps): React.JSX.Element {
|
||||
return (
|
||||
<div className="grid h-full min-h-0 auto-rows-fr grid-cols-1 gap-4 overflow-y-auto pr-1 md:grid-cols-2">
|
||||
{panels.map((panelId) => (
|
||||
<OrchestratorPanel key={panelId} />
|
||||
))}
|
||||
{panels.map((panelId, index) => {
|
||||
const sessionId = panelSessionIds?.[index];
|
||||
|
||||
if (sessionId === undefined) {
|
||||
return <OrchestratorPanel key={panelId} />;
|
||||
}
|
||||
|
||||
return <OrchestratorPanel key={panelId} sessionId={sessionId} />;
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user