Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes MAP-1463
This pull request refactors and improves the code for displaying area information in the map view. The main change is the extraction of the area list/table rendering logic from
AreaInfo.tsxinto a new, reusable component, which simplifiesAreaInfo.tsxand promotes code reuse. Additionally, utility functions are moved to a shared location, and unused code is cleaned up in bothAreaInfo.tsxandAreaPopup.tsx.Component extraction and code reuse:
AreaInfo.tsxinto a newAreasListcomponent (BoundaryHoverInfo/AreasList.tsx), making the code more modular and reusable. ([src/app/map/[id]/components/BoundaryHoverInfo/AreasList.tsxR1-R227](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-f3fda1a4960861a049a7e5e60ddf990c9f72181fab0a80f7dc6db4a1245e3084R1-R227))getDisplayValueutility function to a shared location for use by multiple components. ([src/app/map/[id]/components/BoundaryHoverInfo/AreasList.tsxR1-R227](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-f3fda1a4960861a049a7e5e60ddf990c9f72181fab0a80f7dc6db4a1245e3084R1-R227))Code cleanup and simplification:
AreaInfo.tsx, streamlining the component. ([src/app/map/[id]/components/AreaInfo.tsxL1-L378](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-d01351cb40cf43dce9f61a2741b5a669bb5f646dade48df3f8f1371512717521L1-L378))AreaPopup.tsx, further simplifying the file. ([src/app/map/[id]/components/AreaPopup.tsxL1-L181](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-57a3a7fe13a7644788b11395f48b41cef7fa055730e35402130434db6cab9a4bL1-L181))