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

fix: Fix router synchronization with redux store

This commit is contained in:
Maksim Eltyshev 2022-12-15 01:34:48 +01:00
parent 1fda1bc687
commit 381146b991
19 changed files with 157 additions and 47 deletions

View file

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import { Route, Routes } from 'react-router-dom';
import { HistoryRouter as Router } from 'redux-first-history/rr6';
import { ReduxRouter } from '../lib/redux-router';
import Paths from '../constants/Paths';
import LoginContainer from '../containers/LoginContainer';
@ -19,7 +19,7 @@ import '../styles.module.scss';
function Root({ store, history }) {
return (
<Provider store={store}>
<Router history={history}>
<ReduxRouter history={history}>
<Routes>
<Route path={Paths.LOGIN} element={<LoginContainer />} />
<Route path={Paths.ROOT} element={<CoreWrapperContainer />} />
@ -28,7 +28,7 @@ function Root({ store, history }) {
<Route path={Paths.CARDS} element={<CoreWrapperContainer />} />
<Route path="*" element={<NotFound />} />
</Routes>
</Router>
</ReduxRouter>
</Provider>
);
}