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