diff --git a/frontend/src/components/projectDetail/downloadOsmData.js b/frontend/src/components/projectDetail/downloadOsmData.js index 6abad84cd3..b1b84b998d 100644 --- a/frontend/src/components/projectDetail/downloadOsmData.js +++ b/frontend/src/components/projectDetail/downloadOsmData.js @@ -155,14 +155,14 @@ export const DownloadOsmData = ({ projectMappingTypes, project }) => { ...feature, ...results[index], })); - const mergedListData = downloadDataList.map((type) => { - if (type.title === selectedCategoryFormat.title) { + const mergedListData = downloadDataList.map((list) => { + if (list.title === selectedCategoryFormat.title) { return { - ...type, + ...list, featuretype: mergedArray, }; } - return type; + return list; }); setDownloadDataList(mergedListData); setIsDownloadingState({ @@ -189,8 +189,6 @@ export const DownloadOsmData = ({ projectMappingTypes, project }) => { }); }; multipleHeadCallForFormat(); - - console.log('test'); }, [selectedCategoryFormat]); return ( @@ -225,7 +223,7 @@ export const DownloadOsmData = ({ projectMappingTypes, project }) => { const loadingState = isDownloadingState?.isDownloading; return (
{type.title}
@@ -273,7 +271,7 @@ export const DownloadOsmData = ({ projectMappingTypes, project }) => { selectedCategoryFormat.title === type.title && type?.featuretype?.map((typ) => ( downloadS3File( selectedCategoryFormat.title, @@ -307,7 +305,7 @@ export const DownloadOsmData = ({ projectMappingTypes, project }) => { {`Last Generated: ${ typ.lastmod ? typ.lastmod : '-' - })`} + }`}