Skip to content

Commit

Permalink
front: Update Region object properties in map component.
Browse files Browse the repository at this point in the history
Refined the region object structure in MapComponent by updating 'hasSubregions'
property with actual data from the 'newRegion' and altering the TODO comments
to reflect the shift in scope for fetching region info and adding it to the
region object.

Issue: #186

Signed-off-by: Nikolay Martyanov <[email protected]>
  • Loading branch information
OhmSpectator committed Jan 1, 2024
1 parent 8ebeae0 commit 85d88dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/RegionMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ function MapComponent() {

const newRegion = fetchRegion(clickedRegion.id, selectedHierarchy.hierarchyId);

// TODO: Create a new object with the region info to set as the selected region, issue #186
const newSelectedRegion = {
id: clickedRegion.id,
name: clickedRegion.name,
info: null, // TODO: Fetch region info, issue #186
hasSubregions: null, // TODO: Fetch, issue #186
info: null, // TODO: Add info to the region object, do in a scope of Issue #196
hasSubregions: newRegion.hasSubregions,
};

setSelectedRegion(newSelectedRegion);
Expand Down

0 comments on commit 85d88dd

Please sign in to comment.