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
chore(right_pane): remove redundant check for note type
Elian Dorana986c84ce758
diff --git a/apps/client/src/widgets/sidebar/HighlightsList.tsx b/apps/client/src/widgets/sidebar/HighlightsList.tsxindex fa9919a32d..c3621d6f5f 100644--- a/apps/client/src/widgets/sidebar/HighlightsList.tsx+++ b/apps/client/src/widgets/sidebar/HighlightsList.tsx@@ -22,7 +22,7 @@ export default function HighlightsList() {const noteType = useNoteProperty(note, "type");const { isReadOnly } = useIsNoteReadOnly(note, noteContext);- return (noteType === "text") && (+ return (<RightPanelWidget id="highlights" title={t("highlights_list_2.title")}>{noteType === "text" && isReadOnly && <ReadOnlyTextHighlightsList />}{noteType === "text" && !isReadOnly && <EditableTextHighlightsList />}diff --git a/apps/client/src/widgets/sidebar/TableOfContents.tsx b/apps/client/src/widgets/sidebar/TableOfContents.tsxindex bbdde25f8d..48c5217e99 100644--- a/apps/client/src/widgets/sidebar/TableOfContents.tsx+++ b/apps/client/src/widgets/sidebar/TableOfContents.tsx@@ -25,7 +25,7 @@ export default function TableOfContents() {const noteType = useNoteProperty(note, "type");const { isReadOnly } = useIsNoteReadOnly(note, noteContext);- return (noteType === "text" || noteType === "doc") && (+ return (<RightPanelWidget id="toc" title={t("toc.table_of_contents")}>{((noteType === "text" && isReadOnly) || (noteType === "doc")) && <ReadOnlyTextTableOfContents />}{noteType === "text" && !isReadOnly && <EditableTextTableOfContents />}