File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/next/src/next-devtools/dev-overlay Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import imgApp from './app.png'
7
7
import { useReducer } from 'react'
8
8
import { DevOverlay } from './dev-overlay'
9
9
import {
10
+ ACTION_DEVTOOLS_INDICATOR_POSITION ,
10
11
ACTION_DEVTOOLS_PANEL_CLOSE ,
11
12
ACTION_DEVTOOLS_PANEL_TOGGLE ,
12
13
ACTION_ERROR_OVERLAY_CLOSE ,
@@ -97,6 +98,7 @@ const initialState: OverlayState = {
97
98
} ,
98
99
isErrorOverlayOpen : false ,
99
100
isDevToolsPanelOpen : false ,
101
+ indicatorPosition : 'bottom-left' ,
100
102
}
101
103
102
104
function useOverlayReducer ( ) {
@@ -118,6 +120,9 @@ function useOverlayReducer() {
118
120
case ACTION_DEVTOOLS_PANEL_CLOSE : {
119
121
return { ...state , isDevToolsPanelOpen : false }
120
122
}
123
+ case ACTION_DEVTOOLS_INDICATOR_POSITION : {
124
+ return { ...state , indicatorPosition : action . indicatorPosition }
125
+ }
121
126
default : {
122
127
return state
123
128
}
Original file line number Diff line number Diff line change @@ -211,8 +211,7 @@ export const INITIAL_OVERLAY_STATE: Omit<
211
211
versionInfo : { installed : '0.0.0' , staleness : 'unknown' } ,
212
212
debugInfo : { devtoolsFrontendUrl : undefined } ,
213
213
isDevToolsPanelOpen : false ,
214
- indicatorPosition :
215
- ( localStorage . getItem ( STORAGE_KEY_POSITION ) as Corners ) ?? 'bottom-left' ,
214
+ indicatorPosition : 'bottom-left' ,
216
215
}
217
216
218
217
function getInitialState (
You can’t perform that action at this time.
0 commit comments