fix: Sidebar flash when moving between collection/document due to mobx-react upgrade
This commit is contained in:
parent
9f05c9bd43
commit
beee8ebee7
|
@ -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);
|
||||
}, []);
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue