Created
December 28, 2017 20:35
-
-
Save peterj/db85a23564520e3e73d3f879b5b69310 to your computer and use it in GitHub Desktop.
This file contains 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
import React, { Component } from 'react'; | |
import Link from './Link'; | |
const ALL_LINKS = [ | |
{ | |
id: '1', | |
hash: 'ABC', | |
url: 'http://google.com', | |
description: 'Google shortlink', | |
}, | |
{ | |
id: '2', | |
hash: 'DEF', | |
url: 'http://graph.cool', | |
description: 'Graphcool shortlink', | |
}, | |
{ | |
id: '3', | |
hash: 'GHI', | |
url: 'http://reactjs.org', | |
description: 'ReactJS shortlink', | |
}, | |
]; | |
class LinkList extends Component { | |
render() { | |
return ( | |
<div> | |
{ALL_LINKS.map(link => <Link key={link.id} link={link} />)} | |
</div> | |
); | |
} | |
} | |
export default LinkList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment