Skip to content

Commit

Permalink
botonic-react: remove use-async-effect dependency (#2879)
Browse files Browse the repository at this point in the history
## Description
* Removed react's `use-async-effect` and `reconnecting-websocket`
dependencies.
  • Loading branch information
vanbasten17 committed Aug 26, 2024
1 parent e84183a commit c2465b0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
15 changes: 0 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/botonic-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@
"react-json-tree": "^0.15.0",
"react-router-dom": "^5.3.4",
"react-textarea-autosize": "^7.1.2",
"reconnecting-websocket": "^4.4.0",
"simplebar-react": "^2.4.3",
"styled-components": "^5.3.0",
"ua-parser-js": "^0.8.1",
"use-async-effect": "^2.2.7",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/botonic-react/src/webchat/webchat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import React, {
} from 'react'
import Textarea from 'react-textarea-autosize'
import styled, { StyleSheetManager } from 'styled-components'
import { useAsyncEffect } from 'use-async-effect'
import { v4 as uuidv4 } from 'uuid'

import { Audio, Document, Image, Text, Video } from '../components'
Expand Down Expand Up @@ -333,7 +332,7 @@ export const Webchat = forwardRef((props, ref) => {
webchatState.lastMessageUpdate,
])

useAsyncEffect(async () => {
useEffect(() => {
if (!webchatState.online) {
setError({
message: getServerErrorMessage(props.server),
Expand Down

0 comments on commit c2465b0

Please sign in to comment.