File tree Expand file tree Collapse file tree
features/syntax-editor/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { lazy , Suspense } from 'react ' ;
1+ import { DevTools , DevToolsProps } from 'jotai-devtools ' ;
22
3- import { DevToolsProps } from 'jotai-devtools' ;
3+ if ( import . meta . env . DEV ) import ( 'jotai-devtools/styles.css' ) ;
44
5- const LazyDevTools = lazy ( ( ) =>
6- Promise . all ( [
7- import ( 'jotai-devtools' ) ,
8- import ( 'jotai-devtools/styles.css' ) ,
9- ] ) . then ( ( [ m ] ) => ( { default : m . DevTools } ) ) ,
10- ) ;
11-
12- export function JotaiDevTools ( props : DevToolsProps ) {
5+ export function JotaiDevTools ( { theme = 'dark' , ...props } : DevToolsProps ) {
136 if ( ! import . meta. env . DEV ) return null ;
14- return (
15- < Suspense fallback = { null } >
16- < LazyDevTools { ...props } />
17- </ Suspense >
18- ) ;
7+ return < DevTools theme = { theme } { ...props } /> ;
198}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default function SyntaxEditorRoot() {
88 return (
99 < Layout >
1010 < Provider store = { analysisStore } >
11- < JotaiDevTools store = { analysisStore } theme = "dark" />
11+ < JotaiDevTools />
1212 < Outlet />
1313 </ Provider >
1414 </ Layout >
You can’t perform that action at this time.
0 commit comments