- {showLeavingNotice ? (
-
- {
- setShowLeavingNotice(false)
- setCurrentUrl(null)
- }}
- onContinue={() => {
- goToUrlLink(currentUrl.url, currentUrl.isExternalUrl)
- // reset current url back to null
- setCurrentUrl(null)
- setShowLeavingNotice(false)
- }}
- />
-
- ) : (
-
-
-
-
- {privacyData.title}
-
-
- {privacyData.updatedOn}
-
-
-
-
- {privacyData.body.map((el, i) => buildElementJSX(el, i))}
-
-
- )}
-
- )
-}
-const getStyles = (tokens) => ({
- header: {
- display: 'flex',
- flexDirection: 'column',
- },
- lastUpdatedDate: {
- color: tokens.TextColor.Secondary,
- fontWeight: tokens.FontWeight.Normal,
- fontSize: tokens.FontSize.XSmall,
- lineHeight: tokens.LineHeight.Small,
- marginTop: tokens.Spacing.XSmall,
- marginBottom: tokens.Spacing.Medium,
- },
- title: {
- marginBottom: tokens.Spacing.XSmall,
- },
- subTitle: {
- marginBottom: tokens.Spacing.Medium,
- fontSize: tokens.FontSize.Body,
- lineHeight: tokens.LineHeight.Body,
- },
- paragraph: {
- marginBottom: tokens.Spacing.XSmall,
- fontSize: tokens.FontSize.ParagraphSmall,
- lineHeight: tokens.LineHeight.ParagraphSmall,
- },
- link: {
- display: 'inline',
- whiteSpace: 'normal',
- height: 'auto',
- fontSize: tokens.FontSize.Small,
- textAlign: 'left',
- },
- list: {
- listStylePosition: 'outside',
- marginTop: tokens.Spacing.Small,
- },
- listItem: {
- color: tokens.TextColor.Default,
- marginLeft: tokens.Spacing.XLarge,
- marginBottom: tokens.Spacing.XSmall,
- '& span': {
- fontSize: tokens.FontSize.ParagraphSmall,
- lineHeight: tokens.LineHeight.ParagraphSmall,
- },
- },
-})
diff --git a/src/views/disclosure/PrivacyPolicy.tsx b/src/views/disclosure/PrivacyPolicy.tsx
new file mode 100644
index 0000000000..98bcc9accd
--- /dev/null
+++ b/src/views/disclosure/PrivacyPolicy.tsx
@@ -0,0 +1,45 @@
+import React, { useState, useEffect } from 'react'
+
+import { SlideDown } from 'src/components/SlideDown'
+import { getDelay } from 'src/utilities/getDelay'
+import { LeavingNoticeFlat } from 'src/components/LeavingNoticeFlat'
+
+import useAnalyticsPath from 'src/hooks/useAnalyticsPath'
+import { PageviewInfo } from 'src/const/Analytics'
+
+import { goToUrlLink } from 'src/utilities/global'
+
+const PRIVACY_POLICY_URL = 'https://www.mx.com/privacy/'
+
+interface PrivacyPolicyProps {
+ onCancel?: () => void
+}
+
+export const PrivacyPolicy = ({ onCancel }: PrivacyPolicyProps = {}) => {
+ useAnalyticsPath(...PageviewInfo.CONNECT_DISCLOSURE_PRIVACY_POLICY)
+ const [isLeavingUrl, setIsLeavingUrl] = useState