chore: Update links to more information about GW moral goods
This commit is contained in:
parent
7d87865714
commit
9fc500bb20
|
@ -3,16 +3,29 @@ import React from "react";
|
|||
let capitalizeFirstLetter = (string) => string.charAt(0).toUpperCase() + string.slice(1)
|
||||
|
||||
export function DisplayElement({element}){
|
||||
let otherkeys = Object.keys(element).filter(key => key!="name" && key!="url" && key != "id")
|
||||
let otherkeys = Object.keys(element).filter(key => key!="name" && key!="url" && key != "id" && key != "isReferenceValue")
|
||||
let othervalues = otherkeys.map(key => element[key])
|
||||
let otherpairs = otherkeys.map((key,i) => ({key: capitalizeFirstLetter(key), value: othervalues[i]}))
|
||||
|
||||
if(element.url){
|
||||
return(
|
||||
<div>
|
||||
{/*<a href={element.url} target="_blank">*/}
|
||||
<h2>{`${element.name}`}</h2>
|
||||
{/*</a>*/}
|
||||
{otherpairs.map(pair => <p key={pair.value}>{`${pair.key}: ${pair.value}`}</p>)}
|
||||
<p>
|
||||
<a href={element.url} target="_blank">More info</a>
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}else{
|
||||
return(
|
||||
<div>
|
||||
<a href={element.url} target="_blank">
|
||||
<h2>{`${element.name}`}</h2>
|
||||
</a>
|
||||
{otherpairs.map(pair => <p key={pair.value}>{`${pair.key}: ${pair.value}`}</p>)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
|
@ -1,29 +1,37 @@
|
|||
[
|
||||
{
|
||||
"name": "Doubling consumption for one person for one year",
|
||||
"note": "(at fairly low levels of wealth)",
|
||||
"isReferenceValue": true
|
||||
"note": "at fairly low levels of wealth",
|
||||
"isReferenceValue": true,
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A5:E5"
|
||||
},
|
||||
{
|
||||
"name": "Averting the death of an individual under 5 from malaria"
|
||||
"name": "Averting the death of an individual under 5 from malaria",
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A8:T8"
|
||||
},
|
||||
{
|
||||
"name": "Averting the death of an individual 5 or older from malaria"
|
||||
"name": "Averting the death of an individual 5 or older from malaria",
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A9:T9"
|
||||
},
|
||||
{
|
||||
"name": "Averting the death of a 6- to 59-month-old child",
|
||||
"note": "(through Vitamin A Supplementation)"
|
||||
"note": "through Vitamin A Supplementation",
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A10:T10"
|
||||
},
|
||||
{
|
||||
"name": "Averting the death of an individual under 5 from vaccine-preventable diseases"
|
||||
"name": "Averting the death of an individual under 5 from vaccine-preventable diseases",
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A11:T11"
|
||||
},
|
||||
{
|
||||
"name": "Averting the death of an individual 5-14 years old from vaccine-preventable diseases"
|
||||
"name": "Averting the death of an individual 5-14 years old from vaccine-preventable diseases",
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A12:T12"
|
||||
},
|
||||
{
|
||||
"name": "Averting the death of an individual 15-49 years old from vaccine-preventable diseases"
|
||||
"name": "Averting the death of an individual 15-49 years old from vaccine-preventable diseases",
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A13:T13"
|
||||
},
|
||||
{
|
||||
"name": "Averting the death of an individual 50-74 years old from vaccine-preventable diseases"
|
||||
"name": "Averting the death of an individual 50-74 years old from vaccine-preventable diseases",
|
||||
"url": "https://docs.google.com/spreadsheets/d/11HsJLpq0Suf3SK_PmzzWpK1tr_BTd364j0l3xVvSCQw/edit#gid=1362437801&range=A14:T14"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user