Skip to content

Commit

Permalink
fix(webchat): remove start conversion button (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmass committed Sep 27, 2022
1 parent 07f58b3 commit 9d5b5e5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/webchat/src/components/common/BotInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class BotInfoPage extends React.Component<BotInfoProps> {
botInfo
} = this.props

const onDismiss = this.props.isConversationStarted ? this.props.toggleBotInfo : this.props.startConversation
return (
<Fragment>
<link rel="stylesheet" href="style.scss" />
Expand Down Expand Up @@ -127,13 +126,9 @@ class BotInfoPage extends React.Component<BotInfoProps> {
tabIndex={1}
ref={(el) => (this.btnEl = el!)}
className={'bpw-botinfo-start-button'}
onClick={onDismiss!.bind(this, undefined)}
onClick={this.props.toggleBotInfo!.bind(this, undefined)}
>
{this.props.isConversationStarted ? (
<FormattedMessage id={'botInfo.backToConversation'} />
) : (
<FormattedMessage id={'botInfo.startConversation'} />
)}
<FormattedMessage id={'botInfo.backToConversation'} />
</button>
</div>
</Fragment>
Expand All @@ -152,9 +147,7 @@ export default inject(({ store }: { store: RootStore }) => ({
botName: store.botName,
botInfo: store.botInfo,
avatarUrl: store.botAvatarUrl,
startConversation: store.startConversation,
toggleBotInfo: store.view.toggleBotInfo,
isConversationStarted: store.isConversationStarted,
updatePreferredLanguage: store.updatePreferredLanguage,
preferredLanguage: store.preferredLanguage,
escapeHTML: store.escapeHTML,
Expand All @@ -175,8 +168,6 @@ type BotInfoProps = WrappedComponentProps &
| 'botName'
| 'avatarUrl'
| 'toggleBotInfo'
| 'startConversation'
| 'isConversationStarted'
| 'updatePreferredLanguage'
| 'preferredLanguage'
| 'escapeHTML'
Expand Down

0 comments on commit 9d5b5e5

Please sign in to comment.