7ff2dbb139
Build & Deploy / Build & Push Docker Image (push) Successful in 2m55s
Test / Type Check (all packages) (push) Successful in 54s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Failing after 48s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Storefront Unit Tests (push) Failing after 40s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Failing after 42s
Test / API Integration Tests (push) Successful in 1m0s
25 lines
1.0 KiB
TypeScript
25 lines
1.0 KiB
TypeScript
'use client'
|
|
|
|
import CarplaceFooter from '@/components/carplace/CarplaceFooter'
|
|
import CarplaceHeader from '@/components/carplace/CarplaceHeader'
|
|
import { useCarplacePreferences } from '@/components/CarplaceShell'
|
|
import { resolveBrowserAppUrl } from '@/lib/appUrls'
|
|
|
|
const skipLabels = { en: 'Skip to content', fr: 'Aller au contenu', ar: 'الانتقال إلى المحتوى' } as const
|
|
|
|
export default function PublicLayout({ children }: { children: React.ReactNode }) {
|
|
const { language } = useCarplacePreferences()
|
|
const dashboardUrl = resolveBrowserAppUrl(process.env.NEXT_PUBLIC_DASHBOARD_URL ?? 'http://localhost:3000/dashboard')
|
|
|
|
return (
|
|
<div className="site-page flex min-h-screen flex-col">
|
|
<a href="#main-content" className="skip-link">{skipLabels[language]}</a>
|
|
<CarplaceHeader dashboardUrl={dashboardUrl} />
|
|
<div className="flex flex-1 flex-col">
|
|
<div className="flex-1">{children}</div>
|
|
<CarplaceFooter dashboardUrl={dashboardUrl} />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|