File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 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) => {
321321 createEffect ( ( ) => {
322322 const rootContainer = panelRef . parentElement ?. parentElement ?. parentElement
323323 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 )
328327 const isVertical =
329328 props . localStore . position === 'left' ||
330329 props . localStore . position === 'right'
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export interface DevtoolsOptions {
3737 errorTypes ?: DevToolsErrorType [ ]
3838}
3939
40- export function ReactQueryDevtools (
40+ function ReactQueryDevtoolsDev (
4141 props : DevtoolsOptions ,
4242) : React . ReactElement | null {
4343 const queryClient = useQueryClient ( )
@@ -93,3 +93,14 @@ export function ReactQueryDevtools(
9393
9494 return < div ref = { ref } > </ div >
9595}
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