2019-08-31 04:07:25 +05:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import { Route, Switch } from 'react-router-dom';
|
|
|
|
import { ConnectedRouter } from 'connected-react-router';
|
|
|
|
|
|
|
|
import Paths from '../constants/Paths';
|
|
|
|
import LoginContainer from '../containers/LoginContainer';
|
2020-05-29 19:31:19 +05:00
|
|
|
import CoreWrapperContainer from '../containers/CoreWrapperContainer';
|
2019-08-31 04:07:25 +05:00
|
|
|
import NotFound from './NotFound';
|
|
|
|
|
|
|
|
import 'react-datepicker/dist/react-datepicker.css';
|
2022-06-20 18:27:39 +02:00
|
|
|
import 'photoswipe/dist/photoswipe.css';
|
2020-05-29 19:31:19 +05:00
|
|
|
import '../lib/custom-ui/styles.css';
|
2019-08-31 04:07:25 +05:00
|
|
|
|
2020-05-29 19:31:19 +05:00
|
|
|
import '../styles.module.scss';
|
2019-08-31 04:07:25 +05:00
|
|
|
|
2022-02-09 00:56:01 +05:00
|
|
|
function Root({ store, history }) {
|
|
|
|
return (
|
|
|
|
<Provider store={store}>
|
|
|
|
<ConnectedRouter history={history}>
|
|
|
|
<Switch>
|
|
|
|
<Route exact path={Paths.LOGIN} component={LoginContainer} />
|
|
|
|
<Route exact path={Paths.ROOT} component={CoreWrapperContainer} />
|
|
|
|
<Route exact path={Paths.PROJECTS} component={CoreWrapperContainer} />
|
|
|
|
<Route exact path={Paths.BOARDS} component={CoreWrapperContainer} />
|
|
|
|
<Route exact path={Paths.CARDS} component={CoreWrapperContainer} />
|
|
|
|
<Route path="*" component={NotFound} />
|
|
|
|
</Switch>
|
|
|
|
</ConnectedRouter>
|
|
|
|
</Provider>
|
|
|
|
);
|
|
|
|
}
|
2019-08-31 04:07:25 +05:00
|
|
|
|
|
|
|
Root.propTypes = {
|
|
|
|
/* eslint-disable react/forbid-prop-types */
|
|
|
|
store: PropTypes.object.isRequired,
|
|
|
|
history: PropTypes.object.isRequired,
|
|
|
|
/* eslint-enable react/forbid-prop-types */
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Root;
|