Skip to content

Instantly share code, notes, and snippets.

@adshin21
Created August 27, 2020 11:46
Show Gist options
  • Save adshin21/29cef72a7017acc785c78d37d11a3d76 to your computer and use it in GitHub Desktop.
Save adshin21/29cef72a7017acc785c78d37d11a3d76 to your computer and use it in GitHub Desktop.
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