mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
BIG-117: fix dashboard redirect all routes to homepage once refresh the page.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user