/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import Layout from '@theme/Layout'; import BlogPostItem from '@theme/BlogPostItem'; import BlogPostPaginator from '@theme/BlogPostPaginator'; import type {Props} from '@theme/BlogPostPage'; import BlogSidebar from '@theme/BlogSidebar'; import TOC from '@theme/TOC'; function BlogPostPage(props: Props): JSX.Element { const {content: BlogPostContents, sidebar} = props; const {frontMatter, metadata} = BlogPostContents; const {title, description, nextItem, prevItem, editUrl} = metadata; const {hide_table_of_contents: hideTableOfContents} = frontMatter; return ( {BlogPostContents && (
{editUrl && ( Edit this page )}
{(nextItem || prevItem) && (
)}
{!hideTableOfContents && BlogPostContents.rightToc && (
)}
)}
); } export default BlogPostPage;