Skip to content

Commit 2622ad5

Browse files
committed
Remove unnecessary code for Babel
1 parent 5b44f60 commit 2622ad5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/component/src/Activity/Speak.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import { hooks } from 'botframework-webchat-api';
22
import { type WebChatActivity } from 'botframework-webchat-core';
33
import { validateProps } from 'botframework-webchat-react-valibot';
4-
import React, { memo, useCallback, useMemo } from 'react';
5-
import ReactSay, { SayUtterance } from 'react-say';
4+
import React, { Fragment, memo, useCallback, useMemo } from 'react';
5+
import Say, { SayUtterance } from 'react-say';
66
import { useRefFrom } from 'use-ref-from';
77
import { any, array, object, optional, pipe, readonly, string, type InferInput } from 'valibot';
88

99
import useWebSpeechPonyfill from '../hooks/useWebSpeechPonyfill';
1010
import SayAlt from './SayAlt';
1111

12-
// TODO: [P*] Do we still need this?
13-
// TODO: [P1] Interop between Babel and esbuild.
14-
const Say = 'default' in ReactSay ? (ReactSay.default as typeof ReactSay) : ReactSay;
1512
const { useMarkActivityAsSpoken, useStyleOptions, useVoiceSelector } = hooks;
1613

1714
// TODO: [P4] Consider moving this feature into BasicActivity
@@ -104,7 +101,7 @@ function Speak(props: SpeakProps) {
104101

105102
return (
106103
!!activity && (
107-
<React.Fragment>
104+
<Fragment>
108105
{speechSynthesisUtterance ? (
109106
<SayUtterance
110107
onEnd={markAsSpoken}
@@ -122,7 +119,7 @@ function Speak(props: SpeakProps) {
122119
/>
123120
)}
124121
{!!showSpokenText && <SayAlt speak={singleLine} />}
125-
</React.Fragment>
122+
</Fragment>
126123
)
127124
);
128125
}

0 commit comments

Comments
 (0)