mirror of
https://github.com/zadam/trilium.git
synced 2025-12-19 22:04:26 +01:00
chore(right_pane): remove redundant check for note type
This commit is contained in:
parent
9b21e042ec
commit
a986c84ce7
@ -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 />}
|
||||
|
||||
@ -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 />}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user