From fa46d28f9386f11d547fb240a15b4f91af1e61b5 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Sun, 15 Dec 2024 11:20:16 +0100 Subject: [PATCH] Next.js: Support v15.1 --- .../src/routing/app-router-provider.tsx | 22 ++++++++++++++++--- .../src/routing/app-router-provider.tsx | 18 +++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/code/frameworks/experimental-nextjs-vite/src/routing/app-router-provider.tsx b/code/frameworks/experimental-nextjs-vite/src/routing/app-router-provider.tsx index 68e01381948c..eec03995d266 100644 --- a/code/frameworks/experimental-nextjs-vite/src/routing/app-router-provider.tsx +++ b/code/frameworks/experimental-nextjs-vite/src/routing/app-router-provider.tsx @@ -44,8 +44,6 @@ function getSelectedParams(currentTree: FlightRouterState, params: Params = {}): continue; } - // Ensure catchAll and optional catchall are turned into an array - // Ensure catchAll and optional catchall are turned into an array const isCatchAll = isDynamicParameter && (segment[2] === 'c' || segment[2] === 'oc'); @@ -82,6 +80,16 @@ export const AppRouterProvider: React.FC @@ -106,10 +114,18 @@ export const AppRouterProvider: React.FC = v15.1.1 + parentTree: tree, + parentCacheNode: newLazyCacheNode, + // END url: pathname, + loading: null, }} > {children} diff --git a/code/frameworks/nextjs/src/routing/app-router-provider.tsx b/code/frameworks/nextjs/src/routing/app-router-provider.tsx index 36e980b1a5fe..3f06a6668648 100644 --- a/code/frameworks/nextjs/src/routing/app-router-provider.tsx +++ b/code/frameworks/nextjs/src/routing/app-router-provider.tsx @@ -80,6 +80,16 @@ export const AppRouterProvider: React.FC @@ -104,8 +114,16 @@ export const AppRouterProvider: React.FC = v15.1.1 + parentTree: tree, + parentCacheNode: newLazyCacheNode, + // END url: pathname, loading: null, }}