chore: update @ciphera-net/ui dependency to version 0.0.40 in package.json and package-lock.json; add useOnlineStatus hook to LayoutContent for dynamic padding adjustment

This commit is contained in:
Usman Baig
2026-02-04 11:17:18 +01:00
parent a5f1d51f51
commit cbd3c38f38
4 changed files with 11 additions and 10 deletions

View File

@@ -3,6 +3,7 @@
import { OfflineBanner } from '@/components/OfflineBanner'
import { Header, Footer } from '@ciphera-net/ui'
import { useAuth } from '@/lib/auth/context'
import { useOnlineStatus } from '@/lib/hooks/useOnlineStatus'
import Link from 'next/link'
import { useEffect, useState } from 'react'
import { getUserOrganizations, switchContext } from '@/lib/api/organization'
@@ -12,6 +13,7 @@ import { useRouter } from 'next/navigation'
export default function LayoutContent({ children }: { children: React.ReactNode }) {
const auth = useAuth()
const router = useRouter()
const isOnline = useOnlineStatus()
const [orgs, setOrgs] = useState<any[]>([])
// * Fetch organizations for the header workspace switcher
@@ -53,11 +55,9 @@ export default function LayoutContent({ children }: { children: React.ReactNode
showFaq={false}
showSecurity={false}
showPricing={true}
bottomContent={<OfflineBanner />}
/>
<div className="pt-24">
<OfflineBanner />
</div>
<main className="flex-1 pt-24 pb-8">
<main className={`flex-1 pb-8 ${isOnline ? 'pt-24' : 'pt-32'}`}>
{children}
</main>
<Footer