We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d65414e commit 8c35558Copy full SHA for 8c35558
src/hooks/useOnRcbEvent.ts
@@ -10,14 +10,14 @@ import { useBotId } from './useBotId';
10
* @param handler callback that receives the event with `detail` containing botId and path info
11
*/
12
export const useOnRcbEvent = (eventName: RcbEvent, handler: (event: RcbBaseEvent) => void) => {
13
- const { getBotId } = useBotId();
+ const { getBotId } = useBotId();
14
15
useEffect(() => {
16
const listener = (event: RcbBaseEvent) => {
17
- // ensures chatbots only respond to their own events
18
- if (event.detail.botId !== getBotId()) {
19
- return;
20
- }
+ // ensures chatbots only respond to their own events
+ if (event.detail.botId !== getBotId()) {
+ return;
+ }
21
handler(event);
22
};
23
0 commit comments