Skip to content

Commit 30ee330

Browse files
committed
refactor: use FlowBuilderAction to render inside Multichannel
1 parent cc0b8c8 commit 30ee330

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
@@ -90,14 +90,13 @@ export class FlowBuilderAction extends React.Component<FlowBuilderActionProps> {
9090
export class FlowBuilderMultichannelAction extends FlowBuilderAction {
9191
render(): JSX.Element | JSX.Element[] {
9292
const { contents, webchatSettingsParams } = this.props
93-
const request = this.context as ActionRequest
93+
9494
return (
9595
<Multichannel text={{ buttonsAsText: false }}>
96-
{(isWebchat(request.session) || isDev(request.session)) &&
97-
!!webchatSettingsParams && (
98-
<WebchatSettings {...webchatSettingsParams} />
99-
)}
100-
{contents.map(content => content.toBotonic(content.id, request))}
96+
<FlowBuilderAction
97+
contents={contents}
98+
webchatSettingsParams={webchatSettingsParams}
99+
/>
101100
</Multichannel>
102101
)
103102
}

0 commit comments

Comments
 (0)