Skip to content

Commit

Permalink
fix: remove function that was created only for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
imOscarCrespo committed Aug 26, 2019
1 parent de7b9e8 commit 73e2e4a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/botonic-react/src/webchat/webchat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ export const Webchat = forwardRef((props, ref) => {
}

const sendPayload = async payload => {
addNewMessage(payload)
if (!payload) return
let input = { type: 'postback', payload }
await sendInput(input)
Expand Down Expand Up @@ -325,14 +324,6 @@ export const Webchat = forwardRef((props, ref) => {
/>
</div>
)
const addNewMessage = value => {
let newComponent = msgToBotonic({ delay: 100, typing: 100 })
if (!newComponent) {
addMessageComponent(<Text from='user'>{value}</Text>)
setMenuIsOpened(false)
return
}
}

return (
<WebchatContext.Provider
Expand Down

0 comments on commit 73e2e4a

Please sign in to comment.