Files
aragrp/components/conditional-layout.tsx
T

20 lines
448 B
TypeScript

'use client'
import { usePathname } from 'next/navigation'
import FooterSection from '@/components/footer'
import { HeroHeader } from '@/components/header'
export function ConditionalLayout({ children }: { children: React.ReactNode }) {
const pathname = usePathname()
const isLoginPage = pathname === '/login'
return (
<>
{!isLoginPage && <HeroHeader />}
{children}
{!isLoginPage && <FooterSection />}
</>
)
}