From a986c84ce7586b76239ae45409eaf849ebb6b96e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 18 Dec 2025 16:59:40 +0200 Subject: [PATCH] chore(right_pane): remove redundant check for note type --- apps/client/src/widgets/sidebar/HighlightsList.tsx | 2 +- apps/client/src/widgets/sidebar/TableOfContents.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/sidebar/HighlightsList.tsx b/apps/client/src/widgets/sidebar/HighlightsList.tsx index fa9919a32..c3621d6f5 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 ( {noteType === "text" && isReadOnly && } {noteType === "text" && !isReadOnly && } diff --git a/apps/client/src/widgets/sidebar/TableOfContents.tsx b/apps/client/src/widgets/sidebar/TableOfContents.tsx index bbdde25f8..48c5217e9 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 ( {((noteType === "text" && isReadOnly) || (noteType === "doc")) && } {noteType === "text" && !isReadOnly && }