Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
vietredweb committed Sep 13, 2024
1 parent 8eb1c0c commit e5a73c4
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/Components/OptInConsent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ declare global {
}
}

let endpoint = process?.env?.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL
? process?.env?.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL
: process?.env?.REACT_APP_ENDPOINT_ANALYTICS_URL
const endpoint =
typeof window !== 'undefined' && window['aesirx1stparty']
? window['aesirx1stparty']
: process?.env?.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL
? process?.env?.NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL
: process?.env?.REACT_APP_ENDPOINT_ANALYTICS_URL
? process?.env?.REACT_APP_ENDPOINT_ANALYTICS_URL
: '';
if (typeof window !== 'undefined') {
if (window['aesirx1stparty']) {
endpoint = window['aesirx1stparty'];
}
}
const OptInConsent = ({
optInConsentData = window?.optInConsentData ? JSON.parse(window?.optInConsentData) : [],
}: Props) => {
Expand Down Expand Up @@ -151,13 +149,13 @@ const OptInConsent = ({
type="checkbox"
label={
item === 'aesirx-analytics-optin-default'
? ((window as any)?.aesirx_analytics_translate
?.txt_revoke_opt_in ?? t('txt_revoke_opt_in'))
: ((window as any)?.aesirx_analytics_translate
? (window as any)?.aesirx_analytics_translate
?.txt_revoke_opt_in ?? t('txt_revoke_opt_in')
: (window as any)?.aesirx_analytics_translate
?.txt_revoke_opt_in ??
t('txt_revoke_opt_in') +
' ' +
item?.replace('aesirx-analytics-optin-', ''))
item?.replace('aesirx-analytics-optin-', '')
}
value={item}
onChange={({ target: { value } }) => {
Expand Down

0 comments on commit e5a73c4

Please sign in to comment.