refactor: route low-cost next modules through compat re-exports (#33622)

This commit is contained in:
yyh
2026-03-18 10:37:29 +08:00
committed by GitHub
parent bbe975c6bc
commit d7f70f3c0f
34 changed files with 66 additions and 33 deletions

View File

@ -1,8 +1,8 @@
import type { HeaderInNormalProps } from './header-in-normal'
import type { HeaderInRestoringProps } from './header-in-restoring'
import type { HeaderInHistoryProps } from './header-in-view-history'
import dynamic from 'next/dynamic'
import { usePathname } from 'next/navigation'
import dynamic from '@/next/dynamic'
import {
useWorkflowMode,
} from '../hooks'

View File

@ -15,7 +15,6 @@ import {
} from 'ahooks'
import { isEqual } from 'es-toolkit/predicate'
import { setAutoFreeze } from 'immer'
import dynamic from 'next/dynamic'
import {
memo,
useCallback,
@ -37,6 +36,7 @@ import ReactFlow, {
} from 'reactflow'
import { IS_DEV } from '@/config'
import { useEventEmitterContextContext } from '@/context/event-emitter'
import dynamic from '@/next/dynamic'
import {
useAllBuiltInTools,
useAllCustomTools,

View File

@ -1,9 +1,9 @@
import type { FC } from 'react'
import type { VersionHistoryPanelProps } from '@/app/components/workflow/panel/version-history-panel'
import dynamic from 'next/dynamic'
import { memo, useCallback, useEffect, useRef } from 'react'
import { useStore as useReactflow } from 'reactflow'
import { useShallow } from 'zustand/react/shallow'
import dynamic from '@/next/dynamic'
import { cn } from '@/utils/classnames'
import { Panel as NodePanel } from '../nodes'
import { useStore } from '../store'