Skip to content

Commit 1e92f03

Browse files
Always show way refs list
1 parent 7accbbf commit 1e92f03

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

apps/osm-merge/src/components/entity-details.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,13 @@ export default function EntityDetails({
2020
if (isWay(entity))
2121
return (
2222
<WayDetails way={entity} open={open}>
23-
{osm ? (
24-
<NodeList
23+
{osm && (
24+
<NodeListDetails
2525
nodes={entity.refs
2626
.map((ref) => osm.nodes.getById(ref))
2727
.filter((n) => n != null)}
2828
onSelect={onSelect ?? noop}
2929
/>
30-
) : (
31-
<tbody>
32-
<tr>
33-
<td>refs</td>
34-
<td>{entity.refs.join(", ")}</td>
35-
</tr>
36-
</tbody>
3730
)}
3831
</WayDetails>
3932
)
@@ -79,6 +72,10 @@ export function WayDetails({
7972
<DetailsContent>
8073
<table className="w-full">
8174
<tbody>
75+
<tr>
76+
<td>refs</td>
77+
<td>{way.refs.join(",")}</td>
78+
</tr>
8279
<TagList tags={way.tags} />
8380
</tbody>
8481
</table>
@@ -132,7 +129,7 @@ export function TagList({ tags }: { tags?: Record<string, unknown> }) {
132129
)
133130
}
134131

135-
export function NodeList({
132+
export function NodeListDetails({
136133
nodes,
137134
onSelect,
138135
}: { nodes: OsmNode[]; onSelect: (node: OsmNode) => void }) {

0 commit comments

Comments
 (0)