Created
November 5, 2018 14:33
-
-
Save tsamaya/a6d8ec4d25d56e04e9bc2a7db4a0d31f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/ResultList.js | |
import React, { Component } from 'react'; | |
class ResultList extends Component { | |
render() { | |
const rate = this.props.response.rate || {}; | |
const results = this.props.response.results || []; | |
return ( | |
<article className="message"> | |
<div className="message-body"> | |
<ol> | |
{results.map((result, index) => { | |
return ( | |
<li key={index}> | |
{result.annotations.flag} {result.formatted} | |
<br /> | |
<code> | |
{result.geometry.lat} {result.geometry.lng} | |
</code> | |
</li> | |
); | |
})} | |
</ol> | |
</div> | |
</article> | |
); | |
} | |
} | |
export default ResultList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment