'use client'
import { useContext } from 'react'
import { useRouter } from 'next/navigation'
import { AppContext } from '@/app/providers'
import { Container } from '@/components/Container'
import { Prose } from '@/components/Prose'
import { type ArticleWithSlug } from '@/lib/articles'
import { formatDate } from '@/lib/formatDate'
function ArrowLeftIcon(props: React.ComponentPropsWithoutRef<'svg'>) {
return (
)
}
export function ArticleLayout({
article,
children,
}: {
article: ArticleWithSlug
children: React.ReactNode
}) {
let router = useRouter()
let { previousPathname } = useContext(AppContext)
return (
{previousPathname && (
)}
{article.title}
{children}
)
}