diff --git a/app/scenes/Collection.js b/app/scenes/Collection.js index 900f32bc4..e35be10c2 100644 --- a/app/scenes/Collection.js +++ b/app/scenes/Collection.js @@ -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); }, []); diff --git a/app/stores/UiStore.js b/app/stores/UiStore.js index 376b852b2..a4638e30e 100644 --- a/app/stores/UiStore.js +++ b/app/stores/UiStore.js @@ -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