layout-router.client.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import React from 'react';
  2. import type { ChildProp } from '../../server/app-render';
  3. import type { ChildSegmentMap } from '../../shared/lib/app-router-context';
  4. import type { FlightRouterState, FlightSegmentPath } from '../../server/app-render';
  5. /**
  6. * InnerLayoutRouter handles rendering the provided segment based on the cache.
  7. */
  8. export declare function InnerLayoutRouter({ parallelRouterKey, url, childNodes, childProp, segmentPath, tree, path, rootLayoutIncluded, }: {
  9. parallelRouterKey: string;
  10. url: string;
  11. childNodes: ChildSegmentMap;
  12. childProp: ChildProp | null;
  13. segmentPath: FlightSegmentPath;
  14. tree: FlightRouterState;
  15. isActive: boolean;
  16. path: string;
  17. rootLayoutIncluded: boolean;
  18. }): JSX.Element | null;
  19. declare type ErrorComponent = React.ComponentType<{
  20. error: Error;
  21. reset: () => void;
  22. }>;
  23. /**
  24. * OuterLayoutRouter handles the current segment as well as <Offscreen> rendering of other segments.
  25. * It can be rendered next to each other with a different `parallelRouterKey`, allowing for Parallel routes.
  26. */
  27. export default function OuterLayoutRouter({ parallelRouterKey, segmentPath, childProp, error, loading, template, rootLayoutIncluded, }: {
  28. parallelRouterKey: string;
  29. segmentPath: FlightSegmentPath;
  30. childProp: ChildProp;
  31. error: ErrorComponent;
  32. template: React.ReactNode;
  33. loading: React.ReactNode | undefined;
  34. rootLayoutIncluded: boolean;
  35. }): JSX.Element;
  36. export {};