diff --git a/mailpoet/assets/js/src/automation/editor/components/automation/flow-ending.tsx b/mailpoet/assets/js/src/automation/editor/components/automation/flow-ending.tsx index f01623f9b0..3847ffcbad 100644 --- a/mailpoet/assets/js/src/automation/editor/components/automation/flow-ending.tsx +++ b/mailpoet/assets/js/src/automation/editor/components/automation/flow-ending.tsx @@ -3,14 +3,23 @@ import { FlowSeparator } from './flow-separator'; import { Step as StepData } from './types'; type Props = { - stepData: StepData; + previousStepData: StepData; index: number; + nextStepData?: StepData; }; -export function FlowEnding({ stepData, index }: Props): JSX.Element { +export function FlowEnding({ + previousStepData, + index, + nextStepData, +}: Props): JSX.Element { return (
- + - {row > 0 && } + {row > 0 && ( + + )}
) : ( - // eslint-disable-next-line react/no-array-index-key - + ); })} diff --git a/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/hooks/index.tsx b/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/hooks/index.tsx index 8e73f35dd1..670d566fd0 100644 --- a/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/hooks/index.tsx +++ b/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/hooks/index.tsx @@ -50,6 +50,7 @@ export function initHooks() { return function StatisticSeparatorWrapper( previousStepData: StepData, index: number, + nextStepData: StepData, ) { return ( <> @@ -62,7 +63,11 @@ export function initHooks() { } /> )} - + ); }; diff --git a/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/statistic-separator.tsx b/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/statistic-separator.tsx index db3c467a32..3fe229c10b 100644 --- a/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/statistic-separator.tsx +++ b/mailpoet/assets/js/src/automation/integrations/mailpoet/analytics/components/tabs/automation-flow/statistic-separator.tsx @@ -8,11 +8,13 @@ import { Step } from '../../../../../../editor/components/automation/types'; type Props = { previousStep: Step; index: number; + nextStep?: Step; }; export function StatisticSeparator({ previousStep, index, + nextStep, }: Props): JSX.Element | null { const { section, stepType } = useSelect( (s) => ({ diff --git a/mailpoet/assets/js/src/automation/types/filters.ts b/mailpoet/assets/js/src/automation/types/filters.ts index 835220104c..4b3430b8d7 100644 --- a/mailpoet/assets/js/src/automation/types/filters.ts +++ b/mailpoet/assets/js/src/automation/types/filters.ts @@ -37,8 +37,9 @@ export type RenderStepFooterType = JSX.Element | null; // mailpoet.automation.render_step_separator export type RenderStepSeparatorType = ( - step: Step, + previousStep: Step, index: number, + nextStep?: Step, ) => JSX.Element; // mailpoet.automation.editor.create_store