Fix workbench errors due to missing auth service
authorDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 7 Aug 2018 13:01:14 +0000 (15:01 +0200)
committerDaniel Kos <daniel.kos@contractors.roche.com>
Tue, 7 Aug 2018 13:01:26 +0000 (15:01 +0200)
No issue #

Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos@contractors.roche.com>

src/index.tsx

index 467aee08dd378915152892fbdcecb67ef4f86c86..aac275f9d63c286af6e032f3b3c4803a5c90e5be 100644 (file)
@@ -33,7 +33,7 @@ addMenuActionSet(ContextMenuKind.RESOURCE, resourceActionSet);
 addMenuActionSet(ContextMenuKind.FAVORITE, favoriteActionSet);
 addMenuActionSet(ContextMenuKind.COLLECTION_FILES, collectionFilesActionSet);
 addMenuActionSet(ContextMenuKind.COLLECTION_FILES_ITEM, collectionFilesItemActionSet);
-addMenuActionSet(ContextMenuKind.COLLECTION, collectionActionSet); 
+addMenuActionSet(ContextMenuKind.COLLECTION, collectionActionSet);
 
 fetchConfig()
     .then(config => {
@@ -44,15 +44,16 @@ fetchConfig()
         store.dispatch(initAuth());
         store.dispatch(getProjectList(services.authService.getUuid()));
 
-        const Token = (props: any) => <ApiToken authService={services.authService} {...props}/>;
+        const TokenComponent = (props: any) => <ApiToken authService={services.authService} {...props}/>;
+        const WorkbenchComponent = (props: any) => <Workbench authService={services.authService} {...props}/>;
 
         const App = () =>
             <MuiThemeProvider theme={CustomTheme}>
                 <Provider store={store}>
                     <ConnectedRouter history={history}>
                         <div>
-                            <Route path="/" component={Workbench} />
-                            <Route path="/token" component={Token} />
+                            <Route path="/" component={WorkbenchComponent} />
+                            <Route path="/token" component={TokenComponent} />
                         </div>
                     </ConnectedRouter>
                 </Provider>