feat: conditionally render footer based on user authentication, displaying WebsiteFooter for unauthenticated users

This commit is contained in:
Usman Baig
2026-01-30 16:11:31 +01:00
parent 8f25fe3af9
commit 6d69070f73
3 changed files with 246 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
'use client'
import { Header, Footer } from '@ciphera-net/ui'
import WebsiteFooter from '@/components/WebsiteFooter'
import { useAuth } from '@/lib/auth/context'
import Link from 'next/link'
import { useEffect, useState } from 'react'
@@ -53,11 +54,15 @@ export default function LayoutContent({ children }: { children: React.ReactNode
<main className="flex-1 pt-24 pb-8">
{children}
</main>
<Footer
LinkComponent={Link}
appName="Pulse"
year="2024-2026"
/>
{auth.user ? (
<Footer
LinkComponent={Link}
appName="Pulse"
year="2024-2026"
/>
) : (
<WebsiteFooter />
)}
</>
)
}