Skip to content

Commit

Permalink
Refactor ExportPipeline ContactInformation to use the new implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgain committed Feb 9, 2024
1 parent 0a4b6e0 commit 365b1f7
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions src/client/modules/ExportPipeline/ExportForm/ExportFormFields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import {
import ResourceOptionsField from '../../../components/Form/elements/ResourceOptionsField'
import Task from '../../../components/Task'

import { TASK_REDIRECT_TO_CONTACT_FORM } from '../../../components/ContactForm/state'
import { TASK_SAVE_EXPORT, ID as STATE_ID } from './state'
import { TASK_SAVE_EXPORT } from './state'

import { transformArrayIdNameToValueLabel } from '../../../transformers'
import { validateTeamMembers } from './validation'
Expand Down Expand Up @@ -177,29 +176,10 @@ const ExportFormFields = ({
}
autoScroll={values.scrollToContact}
/>
<Task>
{(getTask) => {
const openContactFormTask = getTask(
TASK_REDIRECT_TO_CONTACT_FORM,
STATE_ID
)
return (
<ContactInformation
companyId={exportItem.company.id}
onOpenContactForm={({ redirectUrl }) => {
openContactFormTask.start({
payload: {
values,
url: redirectUrl,
storeId: STATE_ID,
},
})
}}
/>
)
}}
</Task>

<ContactInformation
companyId={exportItem.company.id}
redirectMode="soft"
/>
<ResourceOptionsField
resource={ExportExperienceResource}
field={FieldRadios}
Expand Down

0 comments on commit 365b1f7

Please sign in to comment.