2026-06-23 20:36:07 -04:00
|
|
|
import { Navbar } from "@/components/marketing/navbar"
|
|
|
|
|
import { Footer } from "@/components/marketing/footer"
|
2026-07-02 13:42:34 -04:00
|
|
|
import { StructuredData } from "@/components/marketing/structured-data"
|
|
|
|
|
import { getSession, isAdminUser } from "@/lib/session"
|
|
|
|
|
import { getMaintenanceMode } from "@/lib/settings"
|
|
|
|
|
import { MaintenanceScreen } from "@/components/shared/maintenance-screen"
|
|
|
|
|
|
|
|
|
|
export default async function MarketingLayout({ children }: { children: React.ReactNode }) {
|
|
|
|
|
// Site maintenance mode: show the maintenance screen to everyone except admins.
|
|
|
|
|
const maintenance = await getMaintenanceMode()
|
|
|
|
|
if (maintenance.enabled) {
|
|
|
|
|
const session = await getSession()
|
|
|
|
|
if (!isAdminUser(session?.user)) {
|
|
|
|
|
return <MaintenanceScreen message={maintenance.message} />
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-06-23 20:36:07 -04:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="min-h-screen bg-[#09090b] text-white">
|
2026-07-02 13:42:34 -04:00
|
|
|
<StructuredData />
|
2026-06-23 20:36:07 -04:00
|
|
|
<Navbar />
|
|
|
|
|
{children}
|
|
|
|
|
<Footer />
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|