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;
|
||||
}
|
||||
|
||||
const TabContent = tab.content;
|
||||
|
||||
return (
|
||||
<div className={`ribbon-body ${!isActive ? "hidden-ext" : ""}`}>
|
||||
{tab?.content && tab.content({
|
||||
note,
|
||||
hidden: !isActive,
|
||||
ntxId,
|
||||
hoistedNoteId,
|
||||
notePath,
|
||||
noteContext,
|
||||
componentId,
|
||||
activate: useCallback(() => {
|
||||
<TabContent
|
||||
note={note}
|
||||
hidden={!isActive}
|
||||
ntxId={ntxId}
|
||||
hoistedNoteId={hoistedNoteId}
|
||||
notePath={notePath}
|
||||
noteContext={noteContext}
|
||||
componentId={componentId}
|
||||
activate={useCallback(() => {
|
||||
setActiveTabIndex(tab.index)
|
||||
}, [setActiveTabIndex])
|
||||
})}
|
||||
}, [setActiveTabIndex])}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
Loading…
x
Reference in New Issue
Block a user