Rocky_Mountain_Vending/.pnpm-store/v10/files/95/3f86a0ea29bfd5789e2d1727ecb8833613a64dcfc44bb5c8f4c7972c2368dddb69e9605868e551c7293372575f0e15aa649e76b28dfa4eb1bac2d9ee6c06e9
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

37 lines
No EOL
1.8 KiB
Text

import { fillLazyItemsTillLeafWithHead } from './fill-lazy-items-till-leaf-with-head';
import { fillCacheWithNewSubTreeData } from './fill-cache-with-new-subtree-data';
export function applyFlightData(navigatedAt, existingCache, cache, flightData) {
// The one before last item is the router state tree patch
const { tree: treePatch, seedData, head, isRootRender } = flightData;
// Handles case where prefetch only returns the router tree patch without rendered components.
if (seedData === null) {
return false;
}
if (isRootRender) {
const rsc = seedData[0];
const loading = seedData[2];
cache.loading = loading;
cache.rsc = rsc;
// This is a PPR-only field. When PPR is enabled, we shouldn't hit
// this path during a navigation, but until PPR is fully implemented
// yet it's possible the existing node does have a non-null
// `prefetchRsc`. As an incremental step, we'll just de-opt to the
// old behavior — no PPR value.
cache.prefetchRsc = null;
fillLazyItemsTillLeafWithHead(navigatedAt, cache, existingCache, treePatch, seedData, head);
} else {
// Copy rsc for the root node of the cache.
cache.rsc = existingCache.rsc;
// This is a PPR-only field. Unlike the previous branch, since we're
// just cloning the existing cache node, we might as well keep the
// PPR value, if it exists.
cache.prefetchRsc = existingCache.prefetchRsc;
cache.parallelRoutes = new Map(existingCache.parallelRoutes);
cache.loading = existingCache.loading;
// Create a copy of the existing cache with the rsc applied.
fillCacheWithNewSubTreeData(navigatedAt, cache, existingCache, flightData);
}
return true;
}
//# sourceMappingURL=apply-flight-data.js.map