Skip to content

Commit

Permalink
Merge pull request #51 from concord-consortium/186939189-restore-map-…
Browse files Browse the repository at this point in the history
…button

Moves showMapButton to app state instead of just render state
  • Loading branch information
lublagg authored Feb 1, 2024
2 parents 85e66ab + 956dee0 commit 6d40de8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/location-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export const LocationPicker = () => {
}
}, [isEditing]);

useEffect(() => {
if (location) {
setShowMapButton(true);
}
}, [location]);

useEffect(() => {
const _startDate = startDate ? startDate : new Date( -5364662060); // 1/1/1750
const _endDate = endDate ? endDate : new Date(Date.now());
Expand Down

0 comments on commit 6d40de8

Please sign in to comment.