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:
@@ -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
|
||||
|
||||
@@ -9,7 +9,7 @@ export function OfflineBanner() {
|
||||
if (isOnline) return null;
|
||||
|
||||
return (
|
||||
<div className="bg-yellow-500/10 dark:bg-yellow-500/20 border-b border-yellow-500/20 dark:border-yellow-500/30 text-yellow-600 dark:text-yellow-400 px-4 py-2 text-sm flex items-center justify-center gap-2 font-medium">
|
||||
<div className="bg-yellow-500/10 dark:bg-yellow-500/20 border-b border-yellow-500/20 dark:border-yellow-500/30 text-yellow-600 dark:text-yellow-400 px-4 sm:px-8 py-2 text-sm flex items-center justify-center gap-2 font-medium">
|
||||
<FiWifiOff className="w-4 h-4" />
|
||||
<span>You are currently offline. Changes may not be saved.</span>
|
||||
</div>
|
||||
|
||||
9
package-lock.json
generated
9
package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "pulse-frontend",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@ciphera-net/ui": "^0.0.39",
|
||||
"@ciphera-net/ui": "^0.0.40",
|
||||
"@ducanh2912/next-pwa": "^10.2.9",
|
||||
"axios": "^1.13.2",
|
||||
"country-flag-icons": "^1.6.4",
|
||||
@@ -1467,9 +1467,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@ciphera-net/ui": {
|
||||
"version": "0.0.39",
|
||||
"resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.39/021cbbe26d3d960bc8e0b037be33eddae2694d96",
|
||||
"integrity": "sha512-UJF38xQZusy01D3i6lUWGnVt2PgIunsQjdoTG2n4r/XyxP/3O8JjliJH90BI++Aix6hAO/TN2on35MYIbAQuTg==",
|
||||
"version": "0.0.40",
|
||||
"resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.40/876fb0a795d894ad2f089ae5b0c7c91a7904c784",
|
||||
"integrity": "sha512-CTtzNU8AIOuFEoU1cUDFutTmmaT8nnuoyIv7D6siT51nJz8MwnWEDbR0vC3t9QFAjx+jq2laK9MvZg4Z5IP3hQ==",
|
||||
"dependencies": {
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"clsx": "^2.1.0",
|
||||
@@ -6841,6 +6841,7 @@
|
||||
"node_modules/next": {
|
||||
"version": "16.1.2",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@next/env": "16.1.2",
|
||||
"@swc/helpers": "0.5.15",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ciphera-net/ui": "^0.0.39",
|
||||
"@ciphera-net/ui": "^0.0.40",
|
||||
"@ducanh2912/next-pwa": "^10.2.9",
|
||||
"axios": "^1.13.2",
|
||||
"country-flag-icons": "^1.6.4",
|
||||
|
||||
Reference in New Issue
Block a user