MCPcopy
hub / github.com/coder/mux / getDraftSectionId

Function getDraftSectionId

src/browser/components/ProjectSidebar/ProjectSidebar.tsx:2165–2172  ·  view source on GitHub ↗
(
                                draft: (typeof sortedDrafts)[number]
                              )

Source from the content-addressed store, hash-verified

2163 )
2164 );
2165 const getDraftSectionId = (
2166 draft: (typeof sortedDrafts)[number]
2167 ): string | null =>
2168 typeof draft.subProjectPath === "string" &&
2169 userProjects.get(draft.subProjectPath)?.parentProjectPath ===
2170 projectPath
2171 ? draft.subProjectPath
2172 : null;
2173
2174 // Drafts can reference a section that has since been deleted.
2175 // Treat those as unsectioned so they remain accessible.

Callers 2

ProjectSidebarInnerFunction · 0.85
renderDraftFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected