MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / ToolkitGrid

Function ToolkitGrid

packages/plugins/toolkits/src/page.tsx:660–703  ·  view source on GitHub ↗
(props: {
  toolkits: readonly ToolkitResponse[];
  onCreate: (input: { owner: Owner; name: string }) => Promise<void>;
})

Source from the content-addressed store, hash-verified

658}
659
660function ToolkitGrid(props: {
661 toolkits: readonly ToolkitResponse[];
662 onCreate: (input: { owner: Owner; name: string }) => Promise<void>;
663}) {
664 const ownerDisplay = useOwnerDisplay();
665 // Toolkit shelves are grouped by owner; the selected toolkit owns the page.
666 const workspaceToolkits = props.toolkits.filter((toolkit) => toolkit.owner === "org");
667 const personalToolkits = props.toolkits.filter((toolkit) => toolkit.owner === "user");
668 if (!ownerDisplay.showOwnerLabels) {
669 return (
670 <div className="min-h-0 flex-1 overflow-y-auto">
671 <div className="w-full space-y-7 px-4 py-4" style={toolkitGridContainerStyle}>
672 <ToolkitSection
673 owner="org"
674 showOwnerLabels={false}
675 toolkits={props.toolkits}
676 onCreate={props.onCreate}
677 />
678 </div>
679 </div>
680 );
681 }
682
683 return (
684 <div className="min-h-0 flex-1 overflow-y-auto">
685 <div className="w-full space-y-7 px-4 py-4" style={toolkitGridContainerStyle}>
686 <ToolkitSection
687 owner="org"
688 showOwnerLabels
689 title="Workspace"
690 toolkits={workspaceToolkits}
691 onCreate={props.onCreate}
692 />
693 <ToolkitSection
694 owner="user"
695 showOwnerLabels
696 title="Personal"
697 toolkits={personalToolkits}
698 onCreate={props.onCreate}
699 />
700 </div>
701 </div>
702 );
703}
704
705function ToolkitContentsEmpty(props: { onManageConnections: () => void }) {
706 return (

Callers

nothing calls this directly

Calls 1

useOwnerDisplayFunction · 0.90

Tested by

no test coverage detected