try suppressing subsequent list items

This commit is contained in:
Ed Chalstrey 2022-08-09 15:27:33 +01:00
parent 85322ef16d
commit fa88bad32f
2 changed files with 19 additions and 4 deletions

View File

@ -30,10 +30,12 @@ const EditHistoryLatest: React.FunctionComponent<EditHistoryLatestProps> = (prop
return ( return (
<> <>
<ul className="edit-history-list" <ul className="edit-history-first" id="first-only">
<li key={`${history[0].revision_id}`} className="edit-history-list-element"> {history && history.map(entry => (
<BuildingEditLatest historyEntry={history[0]} /> <li key={`${entry.revision_id}`} className="edit-history-list-element">
</li> <BuildingEditLatest historyEntry={entry} />
</li>
))}
</ul> </ul>
</> </>
); );

View File

@ -5,4 +5,17 @@
.edit-history-list { .edit-history-list {
list-style: none; list-style: none;
padding-left: 1rem; padding-left: 1rem;
}
ul[id="first-only"] li{
color: black;
display: none;
position: absolute;
font-size: 30px;
}
ul[id="first-only"] li:first-of-type {
color: black;
display: block;
position: absolute;
font-size: 30px;
} }