From cfb8a76b32e21c0c552a36cdef8a31f76567a926 Mon Sep 17 00:00:00 2001 From: Nishit Suwal <81785002+NSUWAL123@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:30:38 +0545 Subject: [PATCH] fix: send bbox from geojson properties to josm (#1256) --- src/frontend/src/api/task.ts | 2 +- .../src/components/ProjectSubmissions/SubmissionsTable.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/api/task.ts b/src/frontend/src/api/task.ts index 94fac3c67d..128869bb3a 100644 --- a/src/frontend/src/api/task.ts +++ b/src/frontend/src/api/task.ts @@ -178,7 +178,7 @@ export const fetchConvertToOsmDetails: Function = (url: string) => { }; }; -export const ConvertXMLToJOSM: Function = (url: string, projectBbox) => { +export const ConvertXMLToJOSM: Function = (url: string, projectBbox: number[]) => { return async (dispatch) => { dispatch(CoreModules.TaskActions.SetConvertXMLToJOSMLoading(true)); const getConvertXMLToJOSM = async (url) => { diff --git a/src/frontend/src/components/ProjectSubmissions/SubmissionsTable.tsx b/src/frontend/src/components/ProjectSubmissions/SubmissionsTable.tsx index 5d95339915..819441e532 100644 --- a/src/frontend/src/components/ProjectSubmissions/SubmissionsTable.tsx +++ b/src/frontend/src/components/ProjectSubmissions/SubmissionsTable.tsx @@ -198,7 +198,7 @@ const SubmissionsTable = ({ toggleView }) => { dispatch( ConvertXMLToJOSM( `${import.meta.env.VITE_API_URL}/submission/get_osm_xml/${decodedId}`, - projectInfo.outline_geojson.bbox, + projectInfo?.outline_geojson?.properties?.bbox, ), ); };