Created
August 25, 2017 15:25
-
-
Save gc-codesnippets/4959cdb8740a9d3112142ce488857d94 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
| import React from 'react' | |
| import Post from './Post' | |
| | |
| const mockPostData = [ | |
| { | |
| node: { | |
| id: "1", | |
| description: "Howdy Partner", | |
| imageUrl: "http://www.cutestpaw.com/wp-content/uploads/2015/09/s-Howdy-partner.jpeg" | |
| } | |
| }, | |
| { | |
| node: { | |
| id: "2", | |
| description: "Ice Cream!", | |
| imageUrl: "https://s-media-cache-ak0.pinimg.com/originals/b9/ba/b9/b9bab9dcacb9efde92e015af07834473.jpg" | |
| } | |
| } | |
| ] | |
| | |
| class ListPage extends React.Component { | |
| | |
| render () { | |
| return ( | |
| <div className='w-100 flex justify-center'> | |
| <div className='w-100' style={{ maxWidth: 400 }}> | |
| {mockPostData.map(({node}) => | |
| <Post key={node.id} post={node} /> | |
| )} | |
| </div> | |
| </div> | |
| ) | |
| } | |
| | |
| } | |
| | |
| export default ListPage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment