Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

743 B
Raw Blame
import { type ComponentProps, Suspense } from 'react';

import { lazyWithRetry } from '../../../utils/lazyWithRetry';
import CardBoundary from '../cards/parts/CardBoundary';

/**
 * The phone's route peek, loaded the first time a route is shown over the
 * map, so the trip screen does not carry the route cards' code before the
 * chat ever draws one. A peek that fails to load or to draw shows nothing:
 * the map and the chat's pill stay as they are.
 */
const RoutePeek = lazyWithRetry(() => import('./RoutePeek'));

export default function RoutePeekLazy(props: ComponentProps<typeof RoutePeek>) {
  return (
    <CardBoundary>
      <Suspense fallback={null}>
        <RoutePeek {...props} />
      </Suspense>
    </CardBoundary>
  );
}