Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
oldschoolshuffle
//FeaturedPost.js
import React, { Component } from 'react';
import './FeaturedPost.css';
import Typography from '@material-ui/core/Typography';
import Paper from '@material-ui/core/Paper';
import Author from './Author';
class FeaturedPost extends Component {
createMarkup(htmlString){
return {__html: htmlString}
}
render() {
return (
<div className="FeaturedPost">
<Paper>
<Typography variant="headline" component="h3">
{this.props.post.title}
</Typography>
<Author authorName={this.props.post.metadata.author.title} avatarImageSrc={this.props.post.metadata.author.metadata.avatarimage.url}/>
<div className="content" dangerouslySetInnerHTML={this.createMarkup(this.props.post.content)}>
</div>
<button className="playArtist">Play Discography</button>
</Paper>
</div>
);
}
}
export default FeaturedPost;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.