Skip to content

Commit 66bc9cb

Browse files
committed
refactor: use FlowBuilderAction to render inside Multichannel
1 parent b2b420d commit 66bc9cb

File tree

1 file changed

+5
-6
lines changed
  • packages/botonic-plugin-flow-builder/src/action

1 file changed

+5
-6
lines changed

packages/botonic-plugin-flow-builder/src/action/index.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,13 @@ export class FlowBuilderAction extends React.Component<FlowBuilderActionProps> {
9191
export class FlowBuilderMultichannelAction extends FlowBuilderAction {
9292
render(): JSX.Element | JSX.Element[] {
9393
const { contents, webchatSettingsParams } = this.props
94-
const request = this.context as ActionRequest
94+
9595
return (
9696
<Multichannel text={{ buttonsAsText: false }}>
97-
{(isWebchat(request.session) || isDev(request.session)) &&
98-
!!webchatSettingsParams && (
99-
<WebchatSettings {...webchatSettingsParams} />
100-
)}
101-
{contents.map(content => content.toBotonic(content.id, request))}
97+
<FlowBuilderAction
98+
contents={contents}
99+
webchatSettingsParams={webchatSettingsParams}
100+
/>
102101
</Multichannel>
103102
)
104103
}

0 commit comments

Comments
 (0)