import { GetStaticPropsContext } from 'next' import { NotionBlock, NotionText } from 'notion-blocks-chakra-ui' import React from 'react' import { getPage, getBlocks, getFullDatabase } from '../../lib/notion' import Image from 'next/image' import { Stack, Container, Button, VStack, Heading, HStack, Text, } from '@chakra-ui/react' import { Page, Block, TitlePropertyValue, RichTextPropertyValue, CheckboxPropertyValue, } from '@notionhq/client/build/src/api-types' import { Footer } from 'components/common/Footer' import { Navbar } from 'components/common/Navbar/Navbar' import { NextChakraLink } from 'components/common/nextChakraAdapters/NextChakraLink' import { SocialMetaTags } from 'components/common/SocialMetaTags' export default function Post({ page, blocks, }: { page: Page blocks: Block[] }) { return ( <> {page && ( )} {((page?.properties?.Published as CheckboxPropertyValue | undefined) ?.checkbox || !page) && ( )} {page ? ( <> {(page.properties.Author as RichTextPropertyValue | undefined) ?.rich_text[0]?.plain_text && ( )} {blocks.map((block) => ( ))} ) : ( Blog post not found )}