MCPcopy Create free account
hub / github.com/coder/coder / setSidebarOption

Function setSidebarOption

site/src/pages/WorkspacePage/Workspace.tsx:80–86  ·  view source on GitHub ↗
(newOption: string)

Source from the content-addressed store, hash-verified

78
79 const sidebarOption = useSearchParamsKey({ key: "sidebar" });
80 const setSidebarOption = (newOption: string) => {
81 if (sidebarOption.value === newOption) {
82 sidebarOption.deleteValue();
83 } else {
84 sidebarOption.setValue(newOption);
85 }
86 };
87
88 const resources = [...workspace.latest_build.resources].sort(
89 (a, b) => countAgents(b) - countAgents(a),

Callers 1

WorkspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected