import * as Routes from '~/routes/routes';
import * as WorkbenchActions from '~/store/workbench/workbench-actions';
import { navigateToRootProject } from '~/store/navigation/navigation-action';
+import { dialogActions } from '~/store/dialog/dialog-actions';
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
const userMatch = Routes.matchUsersRoute(pathname);
const linksMatch = Routes.matchLinksRoute(pathname);
+ store.dispatch(dialogActions.CLOSE_ALL_DIALOGS());
+
if (projectMatch) {
store.dispatch(WorkbenchActions.loadProject(projectMatch.params.id));
} else if (collectionMatch) {