Skip to content

Commit 73e2e4a

Browse files
committed
fix: remove function that was created only for testing
1 parent de7b9e8 commit 73e2e4a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

packages/botonic-react/src/webchat/webchat.jsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ export const Webchat = forwardRef((props, ref) => {
258258
}
259259

260260
const sendPayload = async payload => {
261-
addNewMessage(payload)
262261
if (!payload) return
263262
let input = { type: 'postback', payload }
264263
await sendInput(input)
@@ -325,14 +324,6 @@ export const Webchat = forwardRef((props, ref) => {
325324
/>
326325
</div>
327326
)
328-
const addNewMessage = value => {
329-
let newComponent = msgToBotonic({ delay: 100, typing: 100 })
330-
if (!newComponent) {
331-
addMessageComponent(<Text from='user'>{value}</Text>)
332-
setMenuIsOpened(false)
333-
return
334-
}
335-
}
336327

337328
return (
338329
<WebchatContext.Provider

0 commit comments

Comments
 (0)