import { useEffect, useState, type ReactNode } from "react"; import { ArrowUpRight } from "lucide-react"; import { Logo } from "@/components/brand/Logo"; import { APP_ORIGIN, DEMO_ORIGIN } from "@/lib/deployment"; type Palette = "landing-dark" | "landing-light"; /** "landing-dark" when the page is in dark mode, tracking the root class as it changes. */ export function useRootPalette(): Palette { // The static branding render runs without a DOM; default to light there. const read = (): Palette => typeof document !== "undefined" && document.documentElement.classList.contains("dark") ? "landing-dark" : "landing-light"; const [palette, setPalette] = useState(read); useEffect(() => { const observer = new MutationObserver(() => setPalette(read())); observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] }); setPalette(read()); return () => observer.disconnect(); }, []); return palette; } const link = "inline-flex min-h-[44px] items-center hover:text-land-fg"; /** * The footer shared by every public page: wordmark, legal and brand links, * credits and the large teal wordmark on a black panel (black in both themes). * It reads the landing palette tokens, so it needs a `landing-*` scope: pass * `palette` to wrap it in one, or omit it inside a page that already has one. * `onSignIn` opens a sign-in dialog; without it, "Sign in" links to the site. */ export function PublicFooter({ palette, onSignIn }: { palette?: Palette; onSignIn?: () => void }) { const body: ReactNode = ( ); return palette ?
{body}
: body; }