Restric order and filters arguments of favorite list
[arvados-workbench2.git] / src / index.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
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';
9 import './index.css';
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";
18 import { MuiThemeProvider } from '@material-ui/core/styles';
19 import { CustomTheme } from './common/custom-theme';
20 import { fetchConfig } from './common/config';
21 import { setBaseUrl } from './common/api/server-api';
22
23 fetchConfig()
24     .then(config => {
25
26         setBaseUrl(config.API_HOST);
27
28         const history = createBrowserHistory();
29         const store = configureStore(history);
30
31         store.dispatch(authActions.INIT());
32         store.dispatch<any>(getProjectList(authService.getUuid()));
33
34         const App = () =>
35             <MuiThemeProvider theme={CustomTheme}>
36                 <Provider store={store}>
37                     <ConnectedRouter history={history}>
38                         <div>
39                             <Route path="/" component={Workbench} />
40                             <Route path="/token" component={ApiToken} />
41                         </div>
42                     </ConnectedRouter>
43                 </Provider>
44             </MuiThemeProvider>;
45
46         ReactDOM.render(
47             <App />,
48             document.getElementById('root') as HTMLElement
49         );
50     });
51
52