🐛 Affichage des références quand pas de références officielles

pull/85/head
mama 2017-10-05 11:31:06 +02:00
parent 1b480cb4cb
commit a445f83ef9
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,10 @@
.references li {
margin-bottom: .15em;
}
#noOfficialReferences {
text-align: center;
font-style: italic;
}
.references .meta {
text-align: right;
width: 16em;

View File

@ -9,7 +9,7 @@ export default class References extends React.Component {
}
render() {
let { refs } = this.props,
{ complementary, official } = R.groupBy(
{ complementary, official=[] } = R.groupBy(
([name, link]) => (this.findRefKey(link) ? "official" : "complementary")
)(R.toPairs(refs)),
showComplementary = this.state.showComplementary,
@ -19,6 +19,7 @@ export default class References extends React.Component {
<ul className="references">
{[
...official.map(this.renderRef),
official.length == 0 ? <li id="noOfficialReferences">Pas de sources officielles</li> : null,
...(showComplementaryButton
? [
<li id="complementary" key="compl">