feat: conditionally render footer based on user authentication, displaying WebsiteFooter for unauthenticated users
This commit is contained in:
@@ -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 />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user