mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
chore: change forward ref to new ref
This commit is contained in:
@ -1,11 +1,4 @@
|
||||
import {
|
||||
forwardRef,
|
||||
memo,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useImperativeHandle,
|
||||
useMemo,
|
||||
} from 'react'
|
||||
import { memo, useCallback, useEffect, useImperativeHandle, useMemo } from 'react'
|
||||
import { useNodes } from 'reactflow'
|
||||
import { BlockEnum } from '../../types'
|
||||
import {
|
||||
@ -35,12 +28,17 @@ type ChatWrapperProps = {
|
||||
onHide: () => void
|
||||
}
|
||||
|
||||
const ChatWrapper = forwardRef<ChatWrapperRefType, ChatWrapperProps>(({
|
||||
showConversationVariableModal,
|
||||
onConversationModalHide,
|
||||
showInputsFieldsPanel,
|
||||
onHide,
|
||||
}, ref) => {
|
||||
const ChatWrapper = (
|
||||
{
|
||||
ref,
|
||||
showConversationVariableModal,
|
||||
onConversationModalHide,
|
||||
showInputsFieldsPanel,
|
||||
onHide,
|
||||
}: ChatWrapperProps & {
|
||||
ref: React.RefObject<ChatWrapperRefType>;
|
||||
},
|
||||
) => {
|
||||
const nodes = useNodes<StartNodeType>()
|
||||
const startNode = nodes.find(node => node.data.type === BlockEnum.Start)
|
||||
const startVariables = startNode?.data.variables
|
||||
@ -168,7 +166,7 @@ const ChatWrapper = forwardRef<ChatWrapperRefType, ChatWrapperProps>(({
|
||||
)}
|
||||
</>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
ChatWrapper.displayName = 'ChatWrapper'
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ const DebugAndPreview = () => {
|
||||
<RiEqualizer2Line className='w-4 h-4' />
|
||||
</ActionButton>
|
||||
</Tooltip>
|
||||
{expanded && <div className='absolute z-10 bottom-[-17px] right-[5px] w-3 h-3 bg-components-panel-on-panel-item-bg border-l-[0.5px] border-t-[0.5px] border-components-panel-border-subtle rotate-45'/>}
|
||||
{expanded && <div className='absolute z-10 bottom-[-17px] right-[5px] w-3 h-3 bg-components-panel-on-panel-item-bg border-l-[0.5px] border-t-[0.5px] border-components-panel-border-subtle rotate-45' />}
|
||||
</div>
|
||||
)}
|
||||
<div className='mx-3 w-[1px] h-3.5 bg-gray-200'></div>
|
||||
|
||||
Reference in New Issue
Block a user