single <p> for latest edit
This commit is contained in:
parent
0b9598f47b
commit
9863e99cb6
@ -27,16 +27,11 @@ const EditHistoryLatest: React.FunctionComponent<EditHistoryLatestProps> = (prop
|
||||
fetchData(); // define and call, because effect cannot return anything and an async fn always returns a Promise
|
||||
}
|
||||
}, [props.building]); // only re-run effect on building prop change
|
||||
|
||||
return (
|
||||
<>
|
||||
<ul className="edit-history-list">
|
||||
{history && history.map(entry => (
|
||||
<li key={`${entry.revision_id}`} className="edit-history-list-element">
|
||||
<BuildingEditLatest historyEntry={entry} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<p key={`${history[0].revision_id}`} className="edit-history-list-element">
|
||||
<BuildingEditLatest historyEntry={history[0]} />
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user