1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00
planka/client/src/components/Root.jsx

44 lines
1.4 KiB
React
Raw Normal View History

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';
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';
import '../lib/custom-ui/styles.css';
2019-08-31 04:07:25 +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;