Skip to content
Snippets Groups Projects
Commit 11765d69 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

plugins must be loaded after the data is initialized

parent a84b148b
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!215plugins must be loaded after the data is initialized
Pipeline #93311 passed
......@@ -40,6 +40,18 @@ export const fetchInitialAppData = createAsyncThunk<
>('appInit/fetchInitialAppData', async ({ queryData }, { dispatch }): Promise<void> => {
dispatch(setProjectId({ queryData }));
/** Fetch all data required for rendering map */
await Promise.all([
dispatch(getConstant()),
dispatch(getConfiguration()),
dispatch(getConfigurationOptions()),
dispatch(getProjectById(PROJECT_ID)),
dispatch(getAllBackgroundsByProjectId(PROJECT_ID)),
dispatch(getAllPublicOverlaysByProjectId(PROJECT_ID)),
dispatch(getModels()),
]);
if (queryData.pluginsId) {
await dispatch(
getInitPlugins({
......@@ -56,17 +68,6 @@ export const fetchInitialAppData = createAsyncThunk<
}
}
/** Fetch all data required for rendering map */
await Promise.all([
dispatch(getConstant()),
dispatch(getConfiguration()),
dispatch(getConfigurationOptions()),
dispatch(getProjectById(PROJECT_ID)),
dispatch(getAllBackgroundsByProjectId(PROJECT_ID)),
dispatch(getAllPublicOverlaysByProjectId(PROJECT_ID)),
dispatch(getModels()),
]);
/** Set map properties to allow rendering. If map params (modelId,backgroundId,position) are not provided in query -> it will be set to map default */
await Promise.all([
dispatch(initMapSizeAndModelId({ queryData })),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment