X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b4a21064a6e4756b22c34f2e78bac99244fddff0..a9ba50241080a83734e8aea0f230cc3fc3f3b7ca:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 00fb4bc0..97613147 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -4,9 +4,10 @@ import { History, Location } from 'history'; import { RootStore } from '~/store/store'; -import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute } from './routes'; +import { matchProcessRoute, matchProcessLogRoute, matchProjectRoute, matchCollectionRoute, matchFavoritesRoute, matchTrashRoute, matchRootRoute, matchSharedWithMeRoute, matchWorkflowRoute } from './routes'; import { loadProject, loadCollection, loadFavorites, loadTrash, loadProcess, loadProcessLog } from '~/store/workbench/workbench-actions'; import { navigateToRootProject } from '~/store/navigation/navigation-action'; +import { loadSharedWithMe, loadWorkflow } from '~/store/workbench/workbench-actions'; export const addRouteChangeHandlers = (history: History, store: RootStore) => { const handler = handleLocationChange(store); @@ -22,7 +23,9 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const trashMatch = matchTrashRoute(pathname); const processMatch = matchProcessRoute(pathname); const processLogMatch = matchProcessLogRoute(pathname); - + const sharedWithMeMatch = matchSharedWithMeRoute(pathname); + const workflowMatch = matchWorkflowRoute(pathname); + if (projectMatch) { store.dispatch(loadProject(projectMatch.params.id)); } else if (collectionMatch) { @@ -37,5 +40,9 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { store.dispatch(loadProcessLog(processLogMatch.params.id)); } else if (rootMatch) { store.dispatch(navigateToRootProject); + } else if (sharedWithMeMatch) { + store.dispatch(loadSharedWithMe); + } else if (workflowMatch) { + store.dispatch(loadWorkflow); } };