-
-
Save jeremeylduvall/84f1175d1bf5863a1e8647d0ebdd0724 to your computer and use it in GitHub Desktop.
Single Photo Start
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
// External | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
// Internal | |
import Header from '../components/header'; | |
const SinglePhoto = ( props ) => { | |
const bio = props.data.allWordpressWpMe.edges[0].node.description; | |
const username = props.data.allWordpressWpMe.edges[0].node.name; | |
const avatar = props.data.allWordpressWpMe.edges[0].node.avatar_urls.wordpress_96; | |
return ( | |
<div> | |
<Header bio={ bio } src={ avatar } username={ username } /> | |
<div>hi</div> | |
</div> | |
) | |
} | |
export default SinglePhoto; | |
SinglePhoto.PropTypes = { | |
data: PropTypes.object | |
} | |
export const pageQuery = graphql` | |
query PhotoQuery { | |
allWordpressWpMe { | |
edges { | |
node { | |
name | |
description | |
avatar_urls { | |
wordpress_96 | |
} | |
} | |
} | |
} | |
} | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment