Skip to content

Commit d864529

Browse files
committed
Merge branch 'develop' into feature/deprecation-notice
2 parents 1a24f9b + 801f2a0 commit d864529

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/dashboard/DashboardThunks.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { updateDashboardSetting } from '../settings/SettingsActions';
33
import { addPage, movePage, removePage, resetDashboardState, setDashboard, setDashboardUuid } from './DashboardActions';
44
import { QueryStatus, runCypherQuery } from '../report/ReportQueryRunner';
55
import { setDraft, setParametersToLoadAfterConnecting, setWelcomeScreenOpen } from '../application/ApplicationActions';
6-
import { updateGlobalParametersThunk } from '../settings/SettingsThunks';
6+
import { updateGlobalParametersThunk,setPageNumberThunk } from '../settings/SettingsThunks';
77
import { createUUID } from '../utils/uuid';
88
import { createLogThunk } from '../application/logging/LoggingThunk';
99
import { applicationGetConnectionUser, applicationIsStandalone } from '../application/ApplicationSelectors';
@@ -125,6 +125,17 @@ export const loadDashboardThunk = (uuid, text) => (dispatch: any, getState: any)
125125
});
126126

127127
dispatch(setDashboard(dashboard));
128+
129+
// Check if we have to navigate to a page
130+
const queryString = window.location.search;
131+
const urlParams = new URLSearchParams(queryString);
132+
const pageToSet = urlParams.get('page');
133+
if (pageToSet !== '' && pageToSet !== null) {
134+
if (!isNaN(pageToSet)) {
135+
dispatch(setPageNumberThunk(pageToSet));
136+
}
137+
}
138+
128139

129140
const { application } = getState();
130141

0 commit comments

Comments
 (0)