MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / defaultNewNoteTarget

Function defaultNewNoteTarget

packages/app-core/src/components/Sidebar.tsx:154–163  ·  view source on GitHub ↗
(
  activeNote: NoteMeta | null,
  vaultSettings: ReturnType<typeof useStore.getState>["vaultSettings"],
)

Source from the content-addressed store, hash-verified

152}
153
154function defaultNewNoteTarget(
155 activeNote: NoteMeta | null,
156 vaultSettings: ReturnType<typeof useStore.getState>["vaultSettings"],
157): { folder: NoteFolder; subpath: string } {
158 if (!activeNote) return { folder: "inbox", subpath: "" };
159 return {
160 folder: activeNote.folder,
161 subpath: noteFolderSubpath(activeNote, vaultSettings),
162 };
163}
164
165function remoteWorkspaceLabel(baseUrl: string | null): string {
166 if (!baseUrl) return "Remote vault";

Callers 1

SidebarFunction · 0.85

Calls 1

noteFolderSubpathFunction · 0.90

Tested by

no test coverage detected