2025-12-03 16:48:15 +03:30
|
|
|
'use client'
|
|
|
|
|
|
|
|
|
|
import { usePathname } from 'next/navigation'
|
|
|
|
|
import FooterSection from '@/components/footer'
|
|
|
|
|
import { HeroHeader } from '@/components/header'
|
2026-07-02 02:46:20 +03:30
|
|
|
import type { ChangelogRelease } from '@/lib/changelog-types'
|
2025-12-03 16:48:15 +03:30
|
|
|
|
2026-07-02 02:46:20 +03:30
|
|
|
export function ConditionalLayout({
|
|
|
|
|
children,
|
|
|
|
|
changelogReleases,
|
|
|
|
|
}: {
|
|
|
|
|
children: React.ReactNode
|
|
|
|
|
changelogReleases: ChangelogRelease[]
|
|
|
|
|
}) {
|
2025-12-03 16:48:15 +03:30
|
|
|
const pathname = usePathname()
|
|
|
|
|
const isLoginPage = pathname === '/login'
|
2026-07-02 02:46:20 +03:30
|
|
|
const showChrome = !isLoginPage
|
2025-12-03 16:48:15 +03:30
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
2026-07-02 02:46:20 +03:30
|
|
|
{showChrome && <HeroHeader />}
|
2025-12-03 16:48:15 +03:30
|
|
|
{children}
|
2026-07-02 02:46:20 +03:30
|
|
|
{showChrome && <FooterSection releases={changelogReleases} />}
|
2025-12-03 16:48:15 +03:30
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|