Created
August 27, 2020 11:46
-
-
Save adshin21/29cef72a7017acc785c78d37d11a3d76 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, { useState } from 'react'; | |
import { useParams } from 'react-router-dom'; | |
import BlogPostPage from '../pages/BlogPostPage'; | |
import SimpleList from '../components/Recommendation'; | |
import { | |
Container, | |
Grid, | |
Typography | |
} from '@material-ui/core'; | |
const BlogPost = () => { | |
const params = useParams(); | |
const [post, setParentPost] = useState({}); | |
return ( | |
<> | |
<Container maxWidth="md"> | |
<BlogPostPage params={params} setParentPost={setParentPost} /> | |
<Grid item key={Math.random()} style={{ marginTop: '10px', marginBottom: '5px' }}> | |
<Typography variant="h5" component="h3" color="textPrimary"> | |
Related Article:{' '} | |
</Typography> | |
<SimpleList tags={post.tags} slug={post.slug} /> | |
</Grid> | |
</Container> | |
</> | |
); | |
}; | |
export default BlogPost; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment