BIG-117: fix dashboard redirect all routes to homepage once refresh the page.

This commit is contained in:
a.bouhuolia
2021-09-23 09:44:30 +02:00
parent 8864e89674
commit 364859a793
13 changed files with 205 additions and 103 deletions

View File

@@ -11,8 +11,8 @@ export default (mapState) => {
sidebarExpended: state.dashboard.sidebarExpended,
preferencesPageTitle: state.dashboard.preferencesPageTitle,
dashboardBackLink: state.dashboard.backLink,
appIsLoading: state.dashboard.appIsLoading,
appIntlIsLoading: state.dashboard.appIntlIsLoading
splashScreenLoading: state.dashboard.splashScreenLoading > 0,
splashScreenCompleted: state.dashboard.splashScreenLoading === 0,
};
return mapState ? mapState(mapped, state, props) : mapped;
};

View File

@@ -2,9 +2,8 @@ import { connect } from 'react-redux';
import t from 'store/types';
import {
toggleExpendSidebar,
appIsLoading,
appIntlIsLoading
} from 'store/dashboard/dashboard.actions';
import { splashStartLoading, splashStopLoading } from '../../store/dashboard/dashboard.actions';
const mapActionsToProps = (dispatch) => ({
changePageTitle: (pageTitle) =>
@@ -50,15 +49,17 @@ const mapActionsToProps = (dispatch) => ({
dispatch({
type: 'CHANGE_PREFERENCES_PAGE_TITLE',
pageTitle,
}),
}),
setDashboardBackLink: (backLink) =>
dispatch({
type: t.SET_DASHBOARD_BACK_LINK,
payload: { backLink },
}),
setAppIsLoading: (isLoading) => dispatch(appIsLoading(isLoading)),
setAppIntlIsLoading: (isLoading) => dispatch(appIntlIsLoading(isLoading)),
// Splash screen start/stop loading.
splashStartLoading: () => splashStartLoading(),
splashStopLoading: () => splashStopLoading(),
});
export default connect(null, mapActionsToProps);