diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 5582760..a97161f 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -15,6 +15,7 @@ import { getBlockTitle } from 'notion-utils' import { mapPageUrl, getCanonicalPageUrl } from 'lib/map-page-url' import { mapNotionImageUrl } from 'lib/map-image-url' import { getPageDescription } from 'lib/get-page-description' +import { getPageTweet } from 'lib/get-page-tweet' import { searchNotion } from 'lib/search-notion' import * as types from 'lib/types' import * as config from 'lib/config' @@ -25,6 +26,7 @@ import { CustomHtml } from './CustomHtml' import { Loading } from './Loading' import { Page404 } from './Page404' import { PageHead } from './PageHead' +import { PageActions } from './PageActions' import { Footer } from './Footer' import { ReactUtterances } from './ReactUtterances' @@ -96,6 +98,7 @@ export const NotionPage: React.FC = ({ const socialDescription = getPageDescription(block, recordMap) ?? config.description let comments: React.ReactNode = null + let pageAside: React.ReactChild = null // only display comments on blog post pages if (isBlogPost) { @@ -109,6 +112,11 @@ export const NotionPage: React.FC = ({ /> ) } + + const tweet = getPageTweet(block, recordMap) + if (tweet) { + pageAside = + } } return ( @@ -205,6 +213,7 @@ export const NotionPage: React.FC = ({ mapImageUrl={mapNotionImageUrl} searchNotion={searchNotion} pageFooter={comments} + pageAside={pageAside} footer={