PR feedback

This commit is contained in:
Tom Moor committed 2025-02-09 18:41:50 -05:00
1 parent 6a4b99ca43
commit ec86e80edb
2 files changed
+19 -4

No files matched your search

@@ -101,9 +101,12 @@ const CollectionLink: React.FC<Props> = ({
collection?.addDocument(newDocument);
closeAddingNewChild();
history.replace(documentEditPath(newDocument));
history.push({
pathname: documentEditPath(newDocument),
state: { sidebarContext },
});
},
[user, closeAddingNewChild, history, collection, documents]
[user, sidebarContext, closeAddingNewChild, history, collection, documents]
);
return (
@@ -240,9 +240,21 @@ function InnerDocumentLink(
collection?.addDocument(newDocument, node.id);
closeAddingNewChild();
history.replace(documentEditPath(newDocument));
history.push({
pathname: documentEditPath(newDocument),
state: { sidebarContext },
});
},
[documents, collection, user, node, doc, history, closeAddingNewChild]
[
documents,
collection,
sidebarContext,
user,
node,
doc,
history,
closeAddingNewChild,
]
);
return (