SPB Git forge
15commits 1branches 0releases
29.7 MBsize
maindefault branch
10 days agolast push
TypeScript 36.3% Python 31.8% Go 18% JavaScript 9.8% Shell 1.9% SQL 1.4% CSS 0.5%
861 B · 22 lines tsx
Raw Blame History
1import { Footer } from '@/components/chrome/Footer';2import { Header } from '@/components/chrome/Header';3import { apiTry } from '@/lib/api';4import { LiveProvider } from '@/lib/live';5import type { GlobalPressure, Ticker } from '@/lib/types';67export const dynamic = 'force-dynamic';89/** Public chrome. One SSE connection per page lives here; the initial state is the SSR value from the same API. */10export default async function SiteLayout({ children }: { children: React.ReactNode }) {11  const [global, ticker] = await Promise.all([apiTry<GlobalPressure>('/api/v1/pressure/global'), apiTry<Ticker>('/api/v1/ticker')]);12  return (13    <LiveProvider initial={{ global, ticker }}>14      <Header />15      <main id="main" className="mx-auto w-full max-w-[1440px] flex-1 px-3 sm:px-5">16        {children}17      </main>18      <Footer />19    </LiveProvider>20  );21}22