1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import * as ReactDOM from 'react-dom';
7 import { Provider } from "react-redux";
8 import Workbench from './views/workbench/workbench';
10 import { Route } from "react-router";
11 import createBrowserHistory from "history/createBrowserHistory";
12 import configureStore from "./store/store";
13 import { ConnectedRouter } from "react-router-redux";
14 import ApiToken from "./views-components/api-token/api-token";
15 import authActions from "./store/auth/auth-action";
16 import { authService } from "./services/services";
17 import { getProjectList } from "./store/project/project-action";
19 const history = createBrowserHistory();
21 const store = configureStore({
37 store.dispatch(authActions.INIT());
38 const rootUuid = authService.getRootUuid();
39 store.dispatch<any>(getProjectList(rootUuid));
42 <Provider store={store}>
43 <ConnectedRouter history={history}>
45 <Route path="/" component={Workbench}/>
46 <Route path="/token" component={ApiToken}/>
53 document.getElementById('root') as HTMLElement