perf: Navigation of shared trees feels slow (#3171)
* perf: Navigation of shared trees feels slow * remove redundant call to setActiveDocument Co-authored-by: Nan Yu <thenanyu@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ type Props = {
|
||||
};
|
||||
|
||||
function SharedSidebar({ rootNode, shareId }: Props) {
|
||||
const { documents } = useStores();
|
||||
const { ui, documents } = useStores();
|
||||
|
||||
return (
|
||||
<Sidebar>
|
||||
@@ -25,6 +25,7 @@ function SharedSidebar({ rootNode, shareId }: Props) {
|
||||
shareId={shareId}
|
||||
depth={1}
|
||||
node={rootNode}
|
||||
activeDocumentId={ui.activeDocumentId}
|
||||
activeDocument={documents.active}
|
||||
/>
|
||||
</Section>
|
||||
|
||||
Reference in New Issue
Block a user