@@ -4,20 +4,17 @@ import { useState } from 'react'
4
4
5
5
import { Dialog , DialogContent , DialogHeader , DialogBody } from '../dialog'
6
6
import { Overlay , OverlayBackdrop } from '../overlay'
7
- import {
8
- ACTION_DEVTOOLS_PANEL_CLOSE ,
9
- STORAGE_KEY_DEVTOOLS_PANEL_POSITION ,
10
- } from '../../shared'
7
+ import { ACTION_DEVTOOLS_PANEL_CLOSE , STORAGE_KEY_POSITION } from '../../shared'
11
8
import { css } from '../../utils/css'
12
9
import { Draggable } from '../errors/dev-tools-indicator/draggable'
13
10
import { INDICATOR_PADDING } from '../devtools-indicator/devtools-indicator'
14
11
15
12
function getInitialPosition ( ) : Corners {
16
13
if (
17
14
typeof localStorage !== 'undefined' &&
18
- localStorage . getItem ( STORAGE_KEY_DEVTOOLS_PANEL_POSITION )
15
+ localStorage . getItem ( STORAGE_KEY_POSITION )
19
16
) {
20
- return localStorage . getItem ( STORAGE_KEY_DEVTOOLS_PANEL_POSITION ) as Corners
17
+ return localStorage . getItem ( STORAGE_KEY_POSITION ) as Corners
21
18
}
22
19
return ( process . env . __NEXT_DEV_INDICATOR_POSITION || 'bottom-left' ) as Corners
23
20
}
@@ -58,8 +55,10 @@ export function DevToolsPanel({
58
55
onDragStart = { ( ) => { } }
59
56
position = { position }
60
57
setPosition = { ( p ) => {
61
- localStorage . setItem ( STORAGE_KEY_DEVTOOLS_PANEL_POSITION , p )
58
+ localStorage . setItem ( STORAGE_KEY_POSITION , p )
62
59
setPosition ( p )
60
+
61
+ console . log ( { STORAGE_KEY_POSITION , p } )
63
62
} }
64
63
>
65
64
< Dialog
0 commit comments