Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webchat): remove start conversion button #541

Merged
merged 6 commits into from
Sep 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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