Skip to content

Commit da0eebb

Browse files
committed
style(express): remove useless import
1 parent ffe7c36 commit da0eebb

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

src/pages/ExpressWizard/index.tsx

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import i18n from 'src/i18n';
5151
import { extractStrapiData } from 'src/common/getStrapiData';
5252
import { useGeti18nExpressTypesByIdQuery } from 'src/features/backoffice/strapi';
5353
import { useSendGTMevent } from 'src/hooks/useGTMevent';
54-
import HttpError from 'src/common/HttpError';
5554
import { ThankYouStep } from './steps/thankYou';
5655
import { WizardHeader } from './wizardHeader';
5756
import { WizardModel } from './wizardModel';
@@ -269,37 +268,34 @@ export const ExpressWizardContainer = () => {
269268

270269
const zapierHandle = async (cp: Campaign) => {
271270
// Post on webhook Zapier axios call
272-
const res = await fetch(
273-
expressTypeData.webhook_url ?? ZAPIER_WEBHOOK_TRIGGER,
274-
{
275-
method: 'POST',
276-
mode: 'no-cors',
277-
headers: {
278-
'Content-Type': 'application/json',
279-
Accept: 'application/json',
271+
await fetch(expressTypeData.webhook_url ?? ZAPIER_WEBHOOK_TRIGGER, {
272+
method: 'POST',
273+
mode: 'no-cors',
274+
headers: {
275+
'Content-Type': 'application/json',
276+
Accept: 'application/json',
277+
},
278+
body: JSON.stringify({
279+
cp: {
280+
...values,
281+
id: cp.id,
282+
...(values.campaign_date && {
283+
start_date: format(values.campaign_date, BASE_DATE_FORMAT),
284+
}),
285+
...(values.campaign_date_end && {
286+
end_date: format(values.campaign_date_end, BASE_DATE_FORMAT),
287+
}),
288+
...(values.campaign_date_end && {
289+
close_date: format(values.campaign_date_end, BASE_DATE_FORMAT),
290+
}),
291+
...(values.campaign_reason && {
292+
reason: reasonItems[values.campaign_reason],
293+
}),
280294
},
281-
body: JSON.stringify({
282-
cp: {
283-
...values,
284-
id: cp.id,
285-
...(values.campaign_date && {
286-
start_date: format(values.campaign_date, BASE_DATE_FORMAT),
287-
}),
288-
...(values.campaign_date_end && {
289-
end_date: format(values.campaign_date_end, BASE_DATE_FORMAT),
290-
}),
291-
...(values.campaign_date_end && {
292-
close_date: format(values.campaign_date_end, BASE_DATE_FORMAT),
293-
}),
294-
...(values.campaign_reason && {
295-
reason: reasonItems[values.campaign_reason],
296-
}),
297-
},
298-
user: userData,
299-
workspace: activeWorkspace,
300-
}),
301-
}
302-
);
295+
user: userData,
296+
workspace: activeWorkspace,
297+
}),
298+
});
303299
};
304300

305301
const wordpressHandle = async (cp: Campaign) => {

0 commit comments

Comments
 (0)