diff --git a/src/App.js b/src/App.js index 8322b62..12166f7 100644 --- a/src/App.js +++ b/src/App.js @@ -52,6 +52,7 @@ class App extends Component { let colors = (this.state.radioDataset === 'LPR') ? this.props.lprColors : this.props.niColors; let thresholds = (this.state.radioDataset === 'LPR') ? this.props.lprThresholds : this.props.niThresholds; return ( +
{countryData.immigrationData.countryName}
-{selectedYear} Selected Total: {countryData.immigrationData.selectedTotal.toLocaleString()}
+{selectedYear} Selected {selectedSet} Total: + {selectedSet === "LPR" ? + selectedKeys.length === 6 ? countryData.immigrationData.total.toLocaleString() + : countryData.immigrationData.selectedTotal.toLocaleString() + : selectedKeys.length === 5 ? countryData.immigrationData.total.toLocaleString() + : countryData.immigrationData.selectedTotal.toLocaleString()}
Immediate Relative: {countryData.immigrationData.immediateRelative.toLocaleString() ? countryData.immigrationData.immediateRelative.toLocaleString(): 'DW'}
+ >Immediate Relative: {isNaN(countryData.immigrationData.immediateRelative) ? 'dw' : countryData.immigrationData.immediateRelative.toLocaleString()}Family-Sponsored: {countryData.immigrationData.familySponsored.toLocaleString() ? countryData.immigrationData.familySponsored.toLocaleString(): 'DW'}
+ >Family-Sponsored: {isNaN(countryData.immigrationData.familySponsored) ? 'dw' : countryData.immigrationData.familySponsored.toLocaleString()}Refugee & Asylee: {countryData.immigrationData.refugeeAsylee.toLocaleString() ? countryData.immigrationData.refugeeAsylee.toLocaleString(): 'DW'}
+ >Refugee & Asylee: {isNaN(countryData.immigrationData.refugeeAsylee) ? 'dw' : countryData.immigrationData.refugeeAsylee.toLocaleString()}Employment-Based: {countryData.immigrationData.employmentBased.toLocaleString() ? countryData.immigrationData.employmentBased.toLocaleString(): 'DW'}
+ >Employment-Based: {isNaN(countryData.immigrationData.employmentBased) ? 'dw' : countryData.immigrationData.employmentBased.toLocaleString()}Diversity Lottery: {countryData.immigrationData.diversityLottery.toLocaleString() ? countryData.immigrationData.diversityLottery.toLocaleString(): 'DW'}
+ >Diversity Lottery: {isNaN(countryData.immigrationData.diversityLottery) ? 'dw' : countryData.immigrationData.diversityLottery.toLocaleString()}Other: {countryData.immigrationData.otherLPR.toLocaleString() ? countryData.immigrationData.otherLPR.toLocaleString(): 'DW'}
+ >Other: {isNaN(countryData.immigrationData.otherLPR) ? 'dw' : countryData.immigrationData.otherLPR.toLocaleString()}Temporary Visitor: {countryData.immigrationData.temporaryVisitor.toLocaleString() ? countryData.immigrationData.temporaryVisitor.toLocaleString(): 'DW'}
+ >Temporary Visitor: {isNaN(countryData.immigrationData.temporaryVisitor) ? 'dw' : countryData.immigrationData.temporaryVisitor.toLocaleString()}Temporary Worker: {countryData.immigrationData.temporaryWorker.toLocaleString() ? countryData.immigrationData.temporaryWorker.toLocaleString(): 'DW'}
+ >Temporary Worker: {isNaN(countryData.immigrationData.temporaryWorker) ? 'dw' : countryData.immigrationData.temporaryWorker.toLocaleString()}Student & Exchange: {countryData.immigrationData.studentExchange.toLocaleString() ? countryData.immigrationData.studentExchange.toLocaleString(): 'DW'}
+ >Student & Exchange: {isNaN(countryData.immigrationData.studentExchange) ? 'dw' : countryData.immigrationData.studentExchange.toLocaleString()}Diplomat & Representative: {countryData.immigrationData.diplomatRep.toLocaleString() ? countryData.immigrationData.diplomatRep.toLocaleString(): 'DW'}
+ >Diplomat & Representative: {isNaN(countryData.immigrationData.diplomatRep) ? 'dw' : countryData.immigrationData.diplomatRep.toLocaleString()}Other: {countryData.immigrationData.otherNI.toLocaleString() ? countryData.immigrationData.otherNI.toLocaleString(): 'DW'}
+ >Other: {isNaN(countryData.immigrationData.otherNI) ? 'dw' : countryData.immigrationData.otherNI.toLocaleString()}