mirror of
https://github.com/langgenius/dify.git
synced 2026-04-08 17:27:19 +08:00
refactor(web): organize devtools per tool
This commit is contained in:
parent
39ef88b50f
commit
04648fc99a
@ -1,3 +1,3 @@
|
||||
export { ReactScan } from './react-scan'
|
||||
export { default as ReactScanLoader } from './react-scan-loader'
|
||||
export { TanStackDevtoolsWrapper } from './tanstack-devtools'
|
||||
export { ReactScanLoader } from './react-scan'
|
||||
export { TanStackDevtoolsWrapper } from './tanstack'
|
||||
|
||||
2
web/app/components/devtools/react-scan/index.ts
Normal file
2
web/app/components/devtools/react-scan/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export { ReactScanLoader } from './loader'
|
||||
export { ReactScan } from './scan'
|
||||
@ -4,12 +4,12 @@ import { lazy, Suspense } from 'react'
|
||||
import { IS_DEV } from '@/config'
|
||||
|
||||
const ReactScan = lazy(() =>
|
||||
import('./react-scan').then(module => ({
|
||||
import('./scan').then(module => ({
|
||||
default: module.ReactScan,
|
||||
})),
|
||||
)
|
||||
|
||||
const ReactScanLoader = () => {
|
||||
export const ReactScanLoader = () => {
|
||||
if (!IS_DEV)
|
||||
return null
|
||||
|
||||
@ -19,5 +19,3 @@ const ReactScanLoader = () => {
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
|
||||
export default ReactScanLoader
|
||||
1
web/app/components/devtools/tanstack/index.ts
Normal file
1
web/app/components/devtools/tanstack/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export { TanStackDevtoolsWrapper } from './devtools'
|
||||
@ -6,7 +6,7 @@ import { lazy, Suspense } from 'react'
|
||||
import { IS_DEV } from '@/config'
|
||||
|
||||
const TanStackDevtoolsWrapper = lazy(() =>
|
||||
import('@/app/components/devtools').then(module => ({
|
||||
import('@/app/components/devtools/tanstack').then(module => ({
|
||||
default: module.TanStackDevtoolsWrapper,
|
||||
})),
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user