// SoloRealtimeBridge — mount in de (app)-layout zodat de SSE-verbinding // blijft staan over Server Action-refreshes van de Solo-page heen. // // Leest het huidige product-id uit de URL (`/products/[id]/solo`). // Wanneer de gebruiker niet op het Solo Paneel zit, wordt de stream // gesloten — geen onnodige verbinding open houden. 'use client' import { usePathname } from 'next/navigation' import { useSoloRealtime } from '@/lib/realtime/use-solo-realtime' const SOLO_PATH_RE = /^\/products\/([^/]+)\/solo$/ export function SoloRealtimeBridge() { const pathname = usePathname() const match = pathname?.match(SOLO_PATH_RE) const productId = match?.[1] ?? null useSoloRealtime(productId) return null }