Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(client): remove items array
Elian Dorana4f34ce6c5e1
diff --git a/apps/client/src/widgets/layout/NoteTitleActions.tsx b/apps/client/src/widgets/layout/NoteTitleActions.tsxindex eabfada7e3..52f70a9917 100644--- a/apps/client/src/widgets/layout/NoteTitleActions.tsx+++ b/apps/client/src/widgets/layout/NoteTitleActions.tsx@@ -21,21 +21,17 @@ export default function NoteTitleActions() {const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_");const noteType = useNoteProperty(note, "type");- const items = [- note && <PromotedAttributes note={note} componentId={componentId} noteContext={noteContext} />,- note && noteType === "search" && <SearchProperties note={note} ntxId={ntxId} />,- note && !isHiddenNote && noteType === "book" && <CollectionProperties note={note} />- ].filter(Boolean);-return (- <div className={clsx("title-actions", items.length > 0 && "visible")}>- {items}+ <div className="title-actions">+ <PromotedAttributes note={note} componentId={componentId} noteContext={noteContext} />+ {noteType === "search" && <SearchProperties note={note} ntxId={ntxId} />}+ {!isHiddenNote && note && noteType === "book" && <CollectionProperties note={note} />}<EditedNotes /></div>);}-function SearchProperties({ note, ntxId }: { note: FNote, ntxId: string | null | undefined }) {+function SearchProperties({ note, ntxId }: { note: FNote | null | undefined, ntxId: string | null | undefined }) {return (note &&<Collapsibletitle={t("search_definition.search_parameters")}