diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e456c57e..8a38c13d 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -8,6 +8,7 @@ import { ServiceWorkerRegister } from "@/components/sw-register"; import { Header } from "@/components/header"; import { Footer } from "@/components/footer"; import { Footer as PfsFooter } from "@profullstack/footer/react"; +import { PitFooter } from "@/components/pit-footer"; import { getSiteUrl } from "@/lib/site-url"; import { priceUsdPerMonth } from "@/lib/plans"; import { getBrand } from "@/lib/brand-server"; @@ -183,9 +184,12 @@ export default async function RootLayout({ @@ -195,6 +199,7 @@ export default async function RootLayout({ + ); diff --git a/src/components/footer.tsx b/src/components/footer.tsx index e626d5d1..4ec54ca6 100644 --- a/src/components/footer.tsx +++ b/src/components/footer.tsx @@ -1,75 +1,18 @@ "use client"; -import Link from "next/link"; -import { PHONENUMBERS_BOT_URL } from "@/components/sister-sim-link"; import { usePathname } from "next/navigation"; -import { Logo } from "@/components/logo"; const APP_ROUTES = ["/inbox", "/settings", "/campaigns", "/contacts", "/analytics", "/org"]; +/** + * One footer row: links, copyright and the Profullstack ring, from + * @profullstack/footer (an async server component rendered in app/layout.tsx + * and handed down as `bottom`). Hidden on app routes. + */ export function Footer({ bottom }: { bottom?: React.ReactNode }) { const pathname = usePathname(); - // Hide footer on app routes if (APP_ROUTES.some((r) => pathname.startsWith(r))) return null; - return ( -
-
-
- {/* Brand */} -
- -

- Multi-platform SMS messaging for developers and businesses. -

-
- - {/* Product */} -
-

Product

-
    -
  • Features
  • -
  • Pricing
  • -
  • Rent a number
  • -
  • API
  • -
-
- - {/* Platforms */} -
-

Platforms

-
    -
  • 🌐 Web App
  • -
  • 📱 iOS & Android
  • -
  • 🖥 Desktop
  • -
  • 📲 PWA
  • -
-
- - {/* Providers */} -
-

Providers

- -
-
- - {/* Copyright, links and the Profullstack webring: @profullstack/footer, server-rendered in app/layout.tsx */} - {bottom &&
{bottom}
} -
-
- ); + return
{bottom}
; } diff --git a/src/components/pit-footer.tsx b/src/components/pit-footer.tsx new file mode 100644 index 00000000..11a9ca8b --- /dev/null +++ b/src/components/pit-footer.tsx @@ -0,0 +1,21 @@ +/** + * The pit.world network footer, fetched on the server and rendered as the last + * thing in on smshub.dev. Cached for an hour; any failure (timeout, + * non-200, odd body) renders nothing so the page never breaks. + */ +const PIT_FOOTER_URL = "https://pit.world/snippets/footer.html?site=smshub.dev"; + +export async function PitFooter() { + try { + const res = await fetch(PIT_FOOTER_URL, { + next: { revalidate: 3600 }, + signal: AbortSignal.timeout(3000), + }); + if (!res.ok) return null; + const html = await res.text(); + if (!html.includes("data-pit-footer")) return null; + return
; + } catch { + return null; + } +}