'use client'
import { usePathname } from 'next/navigation'
import Footer from './Footer'
interface LayoutWrapperProps {
children: React.ReactNode
}
export default function LayoutWrapper({ children }: LayoutWrapperProps) {
const pathname = usePathname()
const isBookEditorPage = pathname?.match(/^\/books\/[^\/]+$/)
const isChatPage = pathname?.startsWith('/dashboard/chat')
const isImagesPage = pathname?.startsWith('/dashboard/images')
const isAuthPage = pathname?.startsWith('/auth/')
return (
<>
<div className="flex-grow">
{children}
</div>
{!isBookEditorPage && !isChatPage && !isImagesPage && !isAuthPage && <Footer />}
</>
)
}