Add info when no recent edit history to display
This commit is contained in:
parent
fe84016e79
commit
2ffa14cdbb
@ -1,6 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import { BuildingEditSummary } from '../building/edit-history/building-edit-summary';
|
||||
import InfoBox from '../components/info-box';
|
||||
import { EditHistoryEntry } from '../models/edit-history-entry';
|
||||
|
||||
const ChangesPage = () => {
|
||||
@ -23,7 +24,9 @@ const ChangesPage = () => {
|
||||
<h1>Global edit history</h1>
|
||||
|
||||
<ul className="edit-history-list">
|
||||
{history && history.map(entry => (
|
||||
{(history == undefined || history.length == 0) ?
|
||||
<InfoBox msg="No changes in the last week"></InfoBox> :
|
||||
history.map(entry => (
|
||||
<li key={`${entry.revision_id}`} className="edit-history-list-element">
|
||||
<BuildingEditSummary
|
||||
historyEntry={entry}
|
||||
@ -31,7 +34,8 @@ const ChangesPage = () => {
|
||||
hyperlinkCategories={true}
|
||||
/>
|
||||
</li>
|
||||
))}
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
|
Loading…
Reference in New Issue
Block a user