mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(react/ribbon): crash due to misuse of component rendering
This commit is contained in:
parent
d92bd16042
commit
26132a2a56
@ -224,20 +224,22 @@ export default function Ribbon() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TabContent = tab.content;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`ribbon-body ${!isActive ? "hidden-ext" : ""}`}>
|
<div className={`ribbon-body ${!isActive ? "hidden-ext" : ""}`}>
|
||||||
{tab?.content && tab.content({
|
<TabContent
|
||||||
note,
|
note={note}
|
||||||
hidden: !isActive,
|
hidden={!isActive}
|
||||||
ntxId,
|
ntxId={ntxId}
|
||||||
hoistedNoteId,
|
hoistedNoteId={hoistedNoteId}
|
||||||
notePath,
|
notePath={notePath}
|
||||||
noteContext,
|
noteContext={noteContext}
|
||||||
componentId,
|
componentId={componentId}
|
||||||
activate: useCallback(() => {
|
activate={useCallback(() => {
|
||||||
setActiveTabIndex(tab.index)
|
setActiveTabIndex(tab.index)
|
||||||
}, [setActiveTabIndex])
|
}, [setActiveTabIndex])}
|
||||||
})}
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user