Skip to content

Commit

Permalink
fix: popover bug
Browse files Browse the repository at this point in the history
  • Loading branch information
majkshkurti committed Oct 6, 2024
1 parent c560c14 commit 7c2548f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions apps/web/components/map/controls/PopoverInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const MapPopoverInfo: React.FC<MapPopoverInfoProps> = ({
onClose,
}) => {
const [detailsView, setDetailsView] = useState<DetailsViewType | undefined>(undefined);

return (
<Popup
onClose={onClose}
Expand Down Expand Up @@ -189,15 +188,16 @@ const MapPopoverInfo: React.FC<MapPopoverInfoProps> = ({
</tr>
</thead>
<tbody>
{detailsView.data.map((item, index) => (
<tr key={index}>
{Object.entries(item).map(([key, value]) => (
<td style={{ paddingRight: 10 }} key={key}>
{value}
</td>
))}
</tr>
))}
{detailsView.data.length > 0 &&
detailsView.data.map((item, index) => (
<tr key={index}>
{Object.entries(item).map(([key, value]) => (
<td style={{ paddingRight: 10 }} key={key}>
{value}
</td>
))}
</tr>
))}
</tbody>
</table>
</Stack>
Expand Down

0 comments on commit 7c2548f

Please sign in to comment.