🔥 Remove inline edit in old engine
This commit is contained in:
@ -63,11 +63,6 @@ export const InputChatBlock = ({
|
||||
setIsEditting(false)
|
||||
}
|
||||
|
||||
const handleGuestBubbleClick = () => {
|
||||
setAnswer(undefined)
|
||||
setIsEditting(true)
|
||||
}
|
||||
|
||||
if (isLoading) return null
|
||||
|
||||
if (answer) {
|
||||
@ -77,7 +72,6 @@ export const InputChatBlock = ({
|
||||
message={answer}
|
||||
showAvatar={typebot.theme.chat.guestAvatar?.isEnabled ?? false}
|
||||
avatarSrc={avatarUrl && parseVariables(typebot.variables)(avatarUrl)}
|
||||
onClick={handleGuestBubbleClick}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
@ -6,33 +6,19 @@ interface Props {
|
||||
message: string
|
||||
showAvatar: boolean
|
||||
avatarSrc?: string
|
||||
onClick: () => void
|
||||
}
|
||||
|
||||
export const GuestBubble = ({
|
||||
message,
|
||||
showAvatar,
|
||||
avatarSrc,
|
||||
onClick,
|
||||
}: Props): JSX.Element => {
|
||||
const [content] = useState(message)
|
||||
const [isDragging, setIsDragging] = useState(false)
|
||||
|
||||
const handleMouseDown = () => setIsDragging(false)
|
||||
const handleMouseMove = () => setIsDragging(true)
|
||||
const handleMouseUp = () => {
|
||||
setIsDragging(false)
|
||||
if (isDragging) return
|
||||
onClick()
|
||||
}
|
||||
|
||||
return (
|
||||
<CSSTransition classNames="bubble" timeout={1000}>
|
||||
<div
|
||||
className="flex justify-end mb-2 items-end"
|
||||
onMouseDown={handleMouseDown}
|
||||
onMouseMove={handleMouseMove}
|
||||
onMouseUp={handleMouseUp}
|
||||
style={{ marginLeft: '50px' }}
|
||||
>
|
||||
<span
|
||||
|
Reference in New Issue
Block a user