feat: Add navigation sidebar to shared documents (#2899)
Co-authored-by: Tom Moor <tom@getoutline.com>
This commit is contained in:
@@ -36,8 +36,6 @@ type Props = RootStore &
|
||||
children: (arg0: any) => React.ReactNode;
|
||||
};
|
||||
|
||||
const sharedTreeCache = {};
|
||||
|
||||
@observer
|
||||
class DataLoader extends React.Component<Props> {
|
||||
sharedTree: NavigationNode | null | undefined;
|
||||
@@ -58,7 +56,7 @@ class DataLoader extends React.Component<Props> {
|
||||
const { documents, match } = this.props;
|
||||
this.document = documents.getByUrl(match.params.documentSlug);
|
||||
this.sharedTree = this.document
|
||||
? sharedTreeCache[this.document.id]
|
||||
? documents.getSharedTree(this.document.id)
|
||||
: undefined;
|
||||
this.loadDocument();
|
||||
}
|
||||
@@ -192,7 +190,6 @@ class DataLoader extends React.Component<Props> {
|
||||
);
|
||||
this.sharedTree = response.sharedTree;
|
||||
this.document = response.document;
|
||||
sharedTreeCache[this.document.id] = response.sharedTree;
|
||||
|
||||
if (revisionId && revisionId !== "latest") {
|
||||
await this.loadRevision();
|
||||
|
||||
Reference in New Issue
Block a user