import { Box, Container, Flex, Heading, Image, Link, Text } from '@chakra-ui/react'; import React from 'react'; type ContentPageHeaderProps = { formattedDate: string; title: string; subtitle: string; author?: { name: string; twitter: string; picture: string; }, subLink?: { text: string; url: string; } }; export function ContentPageHeader(props: ContentPageHeaderProps) { const { title, subtitle, author = null, formattedDate, subLink = null } = props; return ( {author?.name && ( <> {''} {author.name} · )} {formattedDate} {subLink?.text && ( <> · {subLink.text} )} {title} {subtitle} ); }