Skip to content

Commit 7aabc38

Browse files
Merge pull request #280 from mxenabled/aw/fix-privacy-policy
aw/fix-privacy-policy
2 parents a3955f3 + 902e2c1 commit 7aabc38

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

src/views/disclosure/Disclosure.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { getSize } from 'src/redux/selectors/Browser'
1414

1515
import { PageviewInfo } from 'src/const/Analytics'
1616
import useAnalyticsPath from 'src/hooks/useAnalyticsPath'
17-
import { __, _p } from 'src/utilities/Intl'
17+
import { __, _p, getLocale } from 'src/utilities/Intl'
1818
import { fadeOut } from 'src/utilities/Animation'
1919

2020
import { SlideDown } from 'src/components/SlideDown'
@@ -63,7 +63,10 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => {
6363
>
6464
{showPrivacyPolicy ? (
6565
<SlideDown delay={getNextDelay()}>
66-
<PrivacyPolicy onCancel={() => setShowPrivacyPolicy(false)} />
66+
<PrivacyPolicy
67+
onCancel={() => setShowPrivacyPolicy(false)}
68+
showExternalLinkPopup={showExternalLinkPopup}
69+
/>
6770
</SlideDown>
6871
) : (
6972
<Fragment>
@@ -160,7 +163,12 @@ export const Disclosure = React.forwardRef((_, disclosureRef) => {
160163
scrollToTop(containerRef)
161164
setShowPrivacyPolicy(true)
162165
} else {
163-
goToUrlLink('https://www.mx.com/privacy/', true)
166+
const locale = getLocale()
167+
const privacyUrl =
168+
locale === 'fr-ca'
169+
? 'https://www.mx.com/fr/privacy/'
170+
: 'https://www.mx.com/privacy/'
171+
goToUrlLink(privacyUrl, true)
164172
}
165173
}}
166174
style={styles.link}

src/views/disclosure/Interstitial.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Link, Stack } from '@mui/material'
1313
import { PageviewInfo } from 'src/const/Analytics'
1414

1515
import useAnalyticsPath from 'src/hooks/useAnalyticsPath'
16-
import { __, _p } from 'src/utilities/Intl'
16+
import { __, _p, getLocale } from 'src/utilities/Intl'
1717
import { goToUrlLink } from 'src/utilities/global'
1818

1919
import { SlideDown } from 'src/components/SlideDown'
@@ -64,7 +64,12 @@ export const DisclosureInterstitial = React.forwardRef((props, interstitialNavRe
6464
}
6565

6666
if (currentView === VIEWS.PRIVACY_POLICY) {
67-
return <PrivacyPolicy onCancel={() => setCurrentView(VIEWS.INTERSTITIAL_DISCLOSURE)} />
67+
return (
68+
<PrivacyPolicy
69+
onCancel={() => setCurrentView(VIEWS.INTERSTITIAL_DISCLOSURE)}
70+
showExternalLinkPopup={showExternalLinkPopup}
71+
/>
72+
)
6873
} else if (currentView === VIEWS.DATA_REQUESTED) {
6974
return <DataRequested setCurrentView={setCurrentView} />
7075
} else if (currentView === VIEWS.AVAILABLE_DATA) {
@@ -180,7 +185,12 @@ export const DisclosureInterstitial = React.forwardRef((props, interstitialNavRe
180185
scrollToTop()
181186
setCurrentView(VIEWS.PRIVACY_POLICY)
182187
} else {
183-
goToUrlLink('https://www.mx.com/privacy/', true)
188+
const locale = getLocale()
189+
const privacyUrl =
190+
locale === 'fr-ca'
191+
? 'https://www.mx.com/fr/privacy/'
192+
: 'https://www.mx.com/privacy/'
193+
goToUrlLink(privacyUrl, true)
184194
}
185195
}}
186196
style={styles.link}

0 commit comments

Comments
 (0)