spb/company-atlas
Public
Python 66.3%
TypeScript 22.7%
JavaScript 8.6%
HTML 1.4%
CSS 0.7%
1import type { Metadata } from 'next';2import { Suspense } from 'react';3import { EventFilters } from '@/components/events/event-filters';4import { LiveFeed } from '@/components/live/live-feed';5import { Container, PageHeader, Unavailable } from '@/components/ui/section';6import { api, liveItems, safe } from '@/lib/api';7import { str, type SP } from '@/lib/params';89export const metadata: Metadata = { title: 'Live feed', description: 'Structured corporate events as they are detected across monitored public surfaces — products, pricing, hiring, leadership, locations and more.' };10export const dynamic = 'force-dynamic';1112export default async function LivePage({ searchParams }: { searchParams: Promise<SP> }) {13 const sp = await searchParams;14 const q = { limit: 80, event_type: str(sp.event_type), min_importance: str(sp.min_importance), country: str(sp.country), industry: str(sp.industry), min_confidence: str(sp.min_confidence) };15 const [live, countries, industries] = await Promise.all([safe(api.live(q)), safe(api.countries()), safe(api.industries())]);16 const initial = liveItems(live);17 return (18 <Container>19 <PageHeader20 eyebrow={21 <>22 <span className="dot pulse" aria-hidden /> Live23 </>24 }25 title="Global live feed"26 lede="Every card is a structured event detected on a monitored public page, with its source, confidence label and evidence. The stream updates in place; hover or pause to read."27 />28 <Suspense>29 <EventFilters showSort={false} countries={(countries?.items ?? []).map((c) => ({ value: c.code, label: c.name }))} industries={(industries?.items ?? []).map((i) => ({ value: i.slug, label: i.name }))} className="mb-4" />30 {live ? <LiveFeed initial={initial} limit={80} /> : <Unavailable what="The live feed" />}31 </Suspense>32 </Container>33 );34}35