Skip to content

Commit

Permalink
fix detections tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel committed Apr 10, 2024
1 parent 55cca2e commit 52ff919
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions apps/fishing-map/features/map/popups/PopupWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,25 @@ function PopupWrapper({
// />
// )
case DataviewCategory.Activity:
return (features as SliceExtendedFourwingsFeature[])?.map((feature) => {
return feature.sublayers.map((sublayer, i) => (
return (features as SliceExtendedFourwingsFeature[])?.map((feature, i) => {
return feature.sublayers.map((sublayer, j) => (
<ActivityTooltipRow
key={i + feature.title}
key={`${i}-${j}`}
feature={{ ...sublayer, category: feature.category as DataviewCategory }}
showFeaturesDetails={type === 'click'}
/>
))
})
case DataviewCategory.Detections:
return (features as FourwingsPickingObject[])?.map((feature, i) => (
<DetectionsTooltipRow
key={i + feature.title}
feature={feature}
showFeaturesDetails={type === 'click'}
/>
))
return (features as FourwingsPickingObject[])?.map((feature, i) => {
return feature.sublayers.map((sublayer, j) => (
<DetectionsTooltipRow
key={`${i}-${j}`}
feature={{ ...sublayer, category: feature.category as DataviewCategory }}
showFeaturesDetails={type === 'click'}
/>
))
})
case DataviewCategory.Events:
return (
<EncounterTooltipRow
Expand Down

0 comments on commit 52ff919

Please sign in to comment.