File tree 2 files changed +15
-5
lines changed 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -321,10 +321,9 @@ export const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
321
321
createEffect ( ( ) => {
322
322
const rootContainer = panelRef . parentElement ?. parentElement ?. parentElement
323
323
if ( ! rootContainer ) return
324
- const styleProp = getSidedProp (
325
- 'padding' ,
326
- props . localStore . position as DevtoolsPosition ,
327
- )
324
+ const currentPosition = ( props . localStore . position ||
325
+ POSITION ) as DevtoolsPosition
326
+ const styleProp = getSidedProp ( 'padding' , currentPosition )
328
327
const isVertical =
329
328
props . localStore . position === 'left' ||
330
329
props . localStore . position === 'right'
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export interface DevtoolsOptions {
37
37
errorTypes ?: DevToolsErrorType [ ]
38
38
}
39
39
40
- export function ReactQueryDevtools (
40
+ function ReactQueryDevtoolsDev (
41
41
props : DevtoolsOptions ,
42
42
) : React . ReactElement | null {
43
43
const queryClient = useQueryClient ( )
@@ -93,3 +93,14 @@ export function ReactQueryDevtools(
93
93
94
94
return < div ref = { ref } > </ div >
95
95
}
96
+
97
+ function ReactQueryDevtoolsProd (
98
+ _props : DevtoolsOptions ,
99
+ ) : React . ReactElement | null {
100
+ return null
101
+ }
102
+
103
+ export const ReactQueryDevtools : typeof ReactQueryDevtoolsDev =
104
+ process . env . NODE_ENV !== 'development'
105
+ ? ReactQueryDevtoolsProd
106
+ : ReactQueryDevtoolsDev
You can’t perform that action at this time.
0 commit comments