Skip to content

Commit 880a811

Browse files
committed
Remove timeout for redirect to support form
1 parent 9b54c1f commit 880a811

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

src/components/consent-form/consent-form.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { legalNoticeContent } from '@/config/legal-notice-content';
1313
import { renderLegalNoticeContent } from '@/utils/render-legal-notice-content';
1414
import NewTabLabel from '@/components/new-tab-label/new-tab-label';
1515
import { LOAD_ZD_BUTTON_TEST_ID } from '@/constants/test-ids';
16-
import { REDIRECT_DELAY_MS } from '@/constants/zendesk-timing';
1716
import { getStorageWithExpiry } from '@/utils/get-storage-with-expiry';
1817
import { formatDateString } from '@/utils/set-storage-with-expiry';
1918
import styles from './consent-form.module.css';
@@ -107,13 +106,10 @@ export default function ConsentForm({ onContinue }: ConsentFormProps) {
107106
skipBaseStyles
108107
className={`${styles.button} ${styles.cancelButton}`}
109108
onClick={() => {
110-
// allow time for a pixel to fire before redirecting
111-
setTimeout(() => {
112-
window.location.href = new URL(
113-
'/subscription-support',
114-
MAIN_SITE_URL,
115-
).href;
116-
}, REDIRECT_DELAY_MS);
109+
window.location.href = new URL(
110+
'/subscription-support',
111+
MAIN_SITE_URL,
112+
).href;
117113
}}
118114
/>
119115
{renderContinueButton(CONSENT_BUTTON_TEXT)}

src/constants/zendesk-timing.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ export const OBSERVER_SETUP_DELAY_MS = 1500;
1818
*/
1919
export const DEFAULT_MAX_RETRIES = 5;
2020

21-
/**
22-
* Delay for redirect after pixel fire
23-
*/
24-
export const REDIRECT_DELAY_MS = 500;
25-
2621
/**
2722
* Delay after Zendesk render before marking as ready
2823
*/

0 commit comments

Comments
 (0)