@seamly/web-ui 20.8.0-beta.2 → 20.8.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/lib/index.debug.js +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.js +12 -0
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/standalone.js +12 -0
- package/build/dist/lib/standalone.min.js +1 -1
- package/package.json +1 -1
- package/src/javascripts/ui/hooks/use-seamly-chat.js +14 -1
package/package.json
CHANGED
|
@@ -7,10 +7,11 @@ import { useDispatch, useSelector } from 'react-redux'
|
|
|
7
7
|
import { selectShowInlineView } from '../../domains/visibility/selectors'
|
|
8
8
|
import { useLiveRegion } from './live-region-hooks'
|
|
9
9
|
import { useSeamlyHasConversation } from './seamly-api-hooks'
|
|
10
|
-
import { useSeamlyLayoutMode } from './seamly-state-hooks'
|
|
10
|
+
import { useEvents, useSeamlyLayoutMode } from './seamly-state-hooks'
|
|
11
11
|
import useSeamlyCommands from './use-seamly-commands'
|
|
12
12
|
|
|
13
13
|
const useSeamlyChat = () => {
|
|
14
|
+
const events = useEvents()
|
|
14
15
|
const { t } = useI18n()
|
|
15
16
|
const { isInline, isWindow } = useSeamlyLayoutMode()
|
|
16
17
|
const { isOpen, isVisible, setVisibility } = useVisibility()
|
|
@@ -63,6 +64,18 @@ const useSeamlyChat = () => {
|
|
|
63
64
|
}
|
|
64
65
|
}, [dispatch])
|
|
65
66
|
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (events.length) {
|
|
69
|
+
spinnerTimeout.current = setTimeout(() => {
|
|
70
|
+
dispatch(setIsLoading(false))
|
|
71
|
+
}, 5000)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return () => {
|
|
75
|
+
clearTimeout(spinnerTimeout.current)
|
|
76
|
+
}
|
|
77
|
+
}, [events, dispatch])
|
|
78
|
+
|
|
66
79
|
useEffect(() => {
|
|
67
80
|
// This is needed to reset the ref to allow connect and start to happen again.
|
|
68
81
|
// Mostly due to Interrupt situations and a reset being called.
|