MCPcopy Index your code
hub / github.com/triggerdotdev/jsonhero-web / PathBarLink

Function PathBarLink

app/components/PathBar.tsx:101–135  ·  view source on GitHub ↗
({
  selectedNodes,
  highlightedNodeId,
  enableEdit,
}: PathBarLinkProps)

Source from the content-addressed store, hash-verified

99};
100
101export function PathBarLink({
102 selectedNodes,
103 highlightedNodeId,
104 enableEdit,
105}: PathBarLinkProps) {
106 const { goToNodeId } = useJsonColumnViewAPI();
107
108 return (
109 <div
110 className="flex flex-shrink-0 flex-grow-0 overflow-x-hidden"
111 onClick={(event) => {
112 if (event.detail == 2) {
113 enableEdit();
114 }
115 }}
116 >
117 {selectedNodes.map((node, index) => {
118 return (
119 <PathBarItem
120 key={index}
121 node={node}
122 isHighlighted={highlightedNodeId === node.id}
123 onClick={(id) => goToNodeId(id, "pathBar")}
124 isLast={index == selectedNodes.length - 1}
125 />
126 );
127 })}
128 <button
129 className="flex ml-auto justify-center items-center w-[26px] h-[26px] hover:bg-slate-300 dark:text-slate-400 dark:hover:bg-white dark:hover:bg-opacity-[10%]"
130 onClick={enableEdit}>
131 <PencilAltIcon className='h-5' />
132 </button>
133 </div>
134 );
135}
136
137export function PathHistoryControls() {
138 const { canGoBack, canGoForward } = useJsonColumnViewState();

Callers

nothing calls this directly

Calls 1

useJsonColumnViewAPIFunction · 0.90

Tested by

no test coverage detected