2019-08-31 04:07:25 +05:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { Provider } from 'react-redux';
|
2022-11-21 00:54:05 +01:00
|
|
|
import { Route, Routes } from 'react-router-dom';
|
|
|
|
import { HistoryRouter as Router } from 'redux-first-history/rr6';
|
2019-08-31 04:07:25 +05:00
|
|
|
|
|
|
|
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';
|
2022-11-20 15:05:21 +01:00
|
|
|
import 'easymde/dist/easymde.min.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}>
|
2022-11-21 00:54:05 +01:00
|
|
|
<Router history={history}>
|
|
|
|
<Routes>
|
|
|
|
<Route path={Paths.LOGIN} element={<LoginContainer />} />
|
|
|
|
<Route path={Paths.ROOT} element={<CoreWrapperContainer />} />
|
|
|
|
<Route path={Paths.PROJECTS} element={<CoreWrapperContainer />} />
|
|
|
|
<Route path={Paths.BOARDS} element={<CoreWrapperContainer />} />
|
|
|
|
<Route path={Paths.CARDS} element={<CoreWrapperContainer />} />
|
|
|
|
<Route path="*" element={<NotFound />} />
|
|
|
|
</Routes>
|
|
|
|
</Router>
|
2022-02-09 00:56:01 +05:00
|
|
|
</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;
|