import type { Metadata } from "next"; import { Geist_Mono, Geist, Instrument_Serif, IBM_Plex_Sans_Arabic, } from "next/font/google"; import localFont from "next/font/local"; import "./globals.css"; import { Header } from "@/components/header"; import { Footer } from "@/components/footer"; import { cn } from "@/lib/utils"; import { ThemeProvider } from "@/components/theme-provider"; import Script from "next/script"; import { cookies, headers } from "next/headers"; const geist = Geist({ subsets: ["latin"], variable: "--font-sans" }); const geistMono = Geist_Mono({ variable: "--font-geist-mono", subsets: ["latin"], }); const instrumentSerif = Instrument_Serif({ variable: "--font-display", subsets: ["latin"], weight: "400", }); const ibmPlexArabic = IBM_Plex_Sans_Arabic({ variable: "--font-arabic", subsets: ["arabic"], weight: ["300", "400", "500", "600", "700"], }); const fastHand = localFont({ src: "./fonts/FastHand.otf", variable: "--font-fast-hand", }); const SITE_URL = ( process.env.NEXT_PUBLIC_SITE_URL ?? "https://darkslategrey-nightingale-132659.hostingersite.com" ).replace(/\/$/, ""); export const metadata: Metadata = { metadataBase: new URL(SITE_URL), title: "HUBAPI — Pre-Launch Marketing Showcase & Waitlist", description: "One planned gateway for multiple LLM providers. Access leading AI models through a unified API layer.", alternates: { canonical: SITE_URL, languages: { en: `${SITE_URL}/?lang=en`, ar: `${SITE_URL}/?lang=ar`, }, }, openGraph: { title: "HUBAPI — Pre-Launch Marketing Showcase", description: "One planned gateway for multiple LLM providers. Standard REST API, multi-model access, unified billing, and a developer-first dashboard.", url: SITE_URL, siteName: "HUBAPI", images: [ { url: "/og-image.png", width: 1200, height: 630, alt: "HUBAPI — Pre-Launch Marketing Showcase", }, ], type: "website", }, twitter: { card: "summary_large_image", title: "HUBAPI — Pre-Launch Marketing Showcase", description: "One planned gateway for multiple LLM providers. Standard REST API, multi-model access, unified billing, and a developer-first dashboard.", images: ["/og-image.png"], }, }; import { SplitFlapAudioProvider } from "@/components/ui/split-flap-text"; import { WaitlistSocialProofTicker } from "@/components/WaitlistSocialProofTicker"; import { LanguageProvider } from "@/components/LanguageContext"; import { SkipToContent } from "@/components/SkipToContent"; export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { const cookieStore = await cookies(); const langCookie = cookieStore.get("hubapi_lang")?.value; let lang = "en"; if (langCookie === "ar" || langCookie === "en") { lang = langCookie; } else { const headersList = await headers(); const acceptLanguage = headersList.get("accept-language") || ""; if (acceptLanguage.toLowerCase().includes("ar")) { lang = "ar"; } } const dir = lang === "ar" ? "rtl" : "ltr"; return (
{/* Google Tag Manager */} {/* End Google Tag Manager */} {/* Google Tag Manager (noscript) */} {/* End Google Tag Manager (noscript) */}