fix: Sidebar flash when moving between collection/document due to mobx-react upgrade

This commit is contained in:
Tom Moor 2021-06-13 17:22:35 -07:00
parent 9f05c9bd43
commit beee8ebee7
2 changed files with 0 additions and 9 deletions

View File

@ -42,7 +42,6 @@ import { updateCollectionUrl } from "../utils/routeHelpers";
import useCurrentTeam from "hooks/useCurrentTeam";
import useImportDocument from "hooks/useImportDocument";
import useStores from "hooks/useStores";
import useUnmount from "hooks/useUnmount";
import CollectionMenu from "menus/CollectionMenu";
import { newDocumentUrl, collectionUrl } from "utils/routeHelpers";
@ -103,8 +102,6 @@ function CollectionScene() {
load();
}, [collections, isFetching, collection, error, id, can]);
useUnmount(ui.clearActiveCollection);
const handlePermissionsModalOpen = React.useCallback(() => {
setPermissionsModalOpen(true);
}, []);

View File

@ -108,15 +108,9 @@ class UiStore {
this.activeCollectionId = collection.id;
};
@action
clearActiveCollection = (): void => {
this.activeCollectionId = undefined;
};
@action
clearActiveDocument = (): void => {
this.activeDocumentId = undefined;
this.activeCollectionId = undefined;
};
@action