add scroll to component

This commit is contained in:
th1nhng0
2021-09-11 19:29:54 +07:00
parent 06b927632e
commit 0359fa41bf
6 changed files with 192 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ import { BlogSEO } from '@/components/SEO'
import siteMetadata from '@/data/siteMetadata'
import formatDate from '@/lib/utils/formatDate'
import Comments from '@/components/comments'
import ScrollTopAndComment from '@/components/ScrollTopAndComment'
export default function PostLayout({ frontMatter, authorDetails, next, prev, children }) {
const { date, title } = frontMatter
@@ -12,6 +13,7 @@ export default function PostLayout({ frontMatter, authorDetails, next, prev, chi
return (
<SectionContainer>
<BlogSEO url={`${siteMetadata.siteUrl}/blog/${frontMatter.slug}`} {...frontMatter} />
<ScrollTopAndComment />
<article>
<div>
<header>