import { Header } from '@/components/Header'
import { Footer } from '@/components/Footer'
import { ClientErrorBoundary } from '@/components/common/ClientErrorBoundary'

export default function PublicLayout({
    children,
}: {
    children: React.ReactNode
}) {
    return (
        <div className="min-h-screen flex flex-col">
            <ClientErrorBoundary fallback={<div className="h-20" />}>
                <Header />
            </ClientErrorBoundary>
            <main className="flex-1 pt-20">
                <ClientErrorBoundary>
                    {children}
                </ClientErrorBoundary>
            </main>
            <ClientErrorBoundary fallback={null}>
                <Footer />
            </ClientErrorBoundary>
        </div>
    )
}
