import { capitalize } from '@konobangu/design-system/lib/utils'; import type { ReactNode } from 'react'; type SidebarProperties = { readonly date: Date; readonly readingTime: string; readonly tags?: string[]; readonly toc?: ReactNode; }; export const Sidebar = async ({ date, readingTime, tags, toc: Toc, }: SidebarProperties) => (
Published
{new Intl.DateTimeFormat('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'America/New_York', }).format(date)}
Reading Time
{readingTime}
Tags
{tags.map(capitalize).join(', ')}
Sections
{Toc}