Skip to content

Commit

Permalink
feat(submissionDetails): if new feature point add then zoom to the po…
Browse files Browse the repository at this point in the history
…int (#1797)
  • Loading branch information
NSUWAL123 authored Sep 20, 2024
1 parent 7c845f7 commit 7e2b450
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/frontend/src/views/SubmissionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ const SubmissionDetails = () => {
properties: {},
};

const newFeaturePoint = {
type: 'Feature',
geometry: {
...restSubmissionDetails?.new_feature_point,
},
properties: {},
};

return (
<>
<UpdateReviewStatusModal />
Expand Down Expand Up @@ -243,7 +251,17 @@ const SubmissionDetails = () => {
<div className="fmtm-flex fmtm-flex-grow fmtm-justify-center fmtm-mt-10 md:fmtm-mt-0">
<div className="fmtm-w-full fmtm-h-[20rem] md:fmtm-h-full fmtm-rounded-lg fmtm-overflow-hidden">
<SubmissionInstanceMap
featureGeojson={coordinatesArray ? geojsonFeature : restSubmissionDetails?.point ? pointFeature : {}}
featureGeojson={
submissionDetailsLoading
? {}
: restSubmissionDetails?.new_feature === 'yes'
? newFeaturePoint
: coordinatesArray
? geojsonFeature
: restSubmissionDetails?.point
? pointFeature
: {}
}
/>
</div>
</div>
Expand Down

0 comments on commit 7e2b450

Please sign in to comment.