Skip to content

Commit 1c6df36

Browse files
committed
page only
1 parent 4fde19a commit 1c6df36

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

packages/next/src/client/components/react-dev-overlay/app/hot-reloader-client.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,12 +613,6 @@ export default function HotReload({
613613
appIsrManifestRef,
614614
])
615615

616-
// Using __NEXT_DEVTOOLS_CLIENT_STATE as we already have it.
617-
window.__NEXT_DEVTOOLS_CLIENT_STATE = {
618-
...window.__NEXT_DEVTOOLS_CLIENT_STATE,
619-
staticPathsInfo: state.devToolsClientState.staticPathsInfo,
620-
}
621-
622616
return (
623617
<AppDevOverlay state={state} globalError={globalError}>
624618
{children}

packages/next/src/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/dev-tools-indicator.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ export function DevToolsIndicator({
4545
const [isDevToolsIndicatorVisible, setIsDevToolsIndicatorVisible] =
4646
useState(true)
4747

48+
// Using __NEXT_DEVTOOLS_CLIENT_STATE to avoid prop drilling.
49+
window.__NEXT_DEVTOOLS_CLIENT_STATE = {
50+
...window.__NEXT_DEVTOOLS_CLIENT_STATE,
51+
staticPathsInfo: state.devToolsClientState.staticPathsInfo,
52+
}
53+
4854
return (
4955
<DevToolsPopover
5056
routerType={state.routerType}

packages/next/src/client/components/react-dev-overlay/ui/components/overview/segment-explorer.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ function PageSegmentTreeLayerPresentation({
8181

8282
const staticPathsInfo = window.__NEXT_DEVTOOLS_CLIENT_STATE?.staticPathsInfo
8383
const staticPaths =
84-
staticPathsInfo && staticPathsInfo.pathname === `/${pagePathPrefix}`
84+
staticPathsInfo &&
85+
nodeName === 'page' &&
86+
staticPathsInfo.pathname === `/${pagePathPrefix}`
8587
? staticPathsInfo.staticPaths
8688
: []
8789

0 commit comments

Comments
 (0)