From c382662093720118e1841d085fac36e812403c06 Mon Sep 17 00:00:00 2001 From: Zac Ioannidis Date: Wed, 28 Oct 2020 17:19:28 +0000 Subject: [PATCH] Added new fields to the rendering of the Card Component --- src/components/CardStack.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/CardStack.jsx b/src/components/CardStack.jsx index 18b501a..a8b5f7b 100644 --- a/src/components/CardStack.jsx +++ b/src/components/CardStack.jsx @@ -70,6 +70,7 @@ class CardStack extends React.Component { ref={thisRef} // sourceError={this.props.sourceError} content={[ + [{ kind: "tag", align: "end", value: `Incident #${event.incident_id}` }], [ { kind: "date", title: "Incident Date", value: parseTimeUS(event.date) }, { kind: "text", title: "Location", value: event.location }, @@ -103,6 +104,13 @@ class CardStack extends React.Component { { kind: "text", title: "Name of reporter(s)", value: event.journalist_name }, { kind: "text", title: "Network", value: event.news_organisation }, ], + [ + { + kind: "links", + title: "Sources", + value: event.links.map((href, idx) => ({ text: `Source ${idx + 1}`, href })) + }, + ] // [{ kind: "text", title: "Category", value: "Press attack" }], ]} language={this.props.language}