chore(right_pane): remove redundant check for note type

This commit is contained in:
Elian Doran 2025-12-18 16:59:40 +02:00
parent 9b21e042ec
commit a986c84ce7
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -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 />}

View File

@ -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 />}