diff --git a/src/js/common/components/Settings/CompleteYourProfile.jsx b/src/js/common/components/Settings/CompleteYourProfile.jsx
index ed495a27e..ea0bdf511 100644
--- a/src/js/common/components/Settings/CompleteYourProfile.jsx
+++ b/src/js/common/components/Settings/CompleteYourProfile.jsx
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
import React, { Component, Suspense } from 'react';
import SupportActions from '../../../actions/SupportActions';
import VoterActions from '../../../actions/VoterActions';
+import ByContinuingNotice from '../../../components/Widgets/ByContinuingNotice';
import VoterPhotoUpload from './VoterPhotoUpload';
import DelayedLoad from '../Widgets/DelayedLoad';
import { renderLog } from '../../utils/logging';
@@ -22,10 +23,7 @@ import CandidateStore from '../../../stores/CandidateStore';
import RepresentativeStore from '../../../stores/RepresentativeStore';
import { validateEmail } from '../../../utils/regex-checks';
-const OpenExternalWebSite = React.lazy(() => import(/* webpackChunkName: 'OpenExternalWebSite' */ '../Widgets/OpenExternalWebSite'));
const SignInButton = React.lazy(() => import(/* webpackChunkName: 'SignInButton' */ '../Navigation/SignInButton'));
-// const SignInModalController = React.lazy(() => import(/* webpackChunkName: 'SignInModalController' */ './SignInModalController'));
-// const SignInModal = React.lazy(() => import(/* webpackChunkName: 'SignInModal' */ '../SignIn/SignInModal'));
class CompleteYourProfile extends Component {
constructor (props) {
@@ -367,30 +365,7 @@ class CompleteYourProfile extends Component {
>}>
- By continuing, you accept WeVote.US's
- {' '}
- Terms of Service
- )}
- className={classes.link}
- />
- {' '}
- and
- {' '}
- Privacy Policy
- )}
- className={classes.link}
- />
- {' '}
+
and agree to receive occasional emails about this campaign and upcoming elections. You can unsubscribe at any time. We will never sell your email address.
diff --git a/src/js/common/components/Settings/SettingsVerifySecretCode.jsx b/src/js/common/components/Settings/SettingsVerifySecretCode.jsx
index 3274f5e49..abf9b635e 100644
--- a/src/js/common/components/Settings/SettingsVerifySecretCode.jsx
+++ b/src/js/common/components/Settings/SettingsVerifySecretCode.jsx
@@ -224,6 +224,7 @@ class SettingsVerifySecretCode extends Component {
const secretCodeVerificationStatus = VoterStore.getSecretCodeVerificationStatus();
const { incorrectSecretCodeEntered, numberOfTriesRemaining, secretCodeVerified, voterMustRequestNewCode, voterSecretCodeRequestsLocked } = secretCodeVerificationStatus;
// console.log(`onVoterStoreChange secretCodeVerified: ${secretCodeVerified}`);
+ // console.log(`onVoterStoreChange secretCodeVerificationStatus: ${JSON.stringify(secretCodeVerificationStatus)}`);
if (secretCodeVerified) {
// console.log('SettingsVerifySecretCode -- onVoterStoreChange secretCodeVerified: yes');
this.closeSignInModalLocal();
@@ -244,6 +245,7 @@ class SettingsVerifySecretCode extends Component {
errorToDisplay = true;
errorMessageToDisplay = 'You\'ve reached the maximum number of tries.';
} else if (incorrectSecretCodeEntered || numberOfTriesRemaining <= 4) {
+ // console.log('onVoterStoreChange DISPLAYING Incorrect code entered.');
errorToDisplay = true;
errorMessageToDisplay = 'Incorrect code entered.';
}
diff --git a/src/js/common/components/SignIn/SignInOptionsPanel.jsx b/src/js/common/components/SignIn/SignInOptionsPanel.jsx
index 12c43a361..32f1ff0a9 100755
--- a/src/js/common/components/SignIn/SignInOptionsPanel.jsx
+++ b/src/js/common/components/SignIn/SignInOptionsPanel.jsx
@@ -1,8 +1,8 @@
import { Facebook, X as Twitter } from '@mui/icons-material';
import PropTypes from 'prop-types';
-import React, { Component, Suspense } from 'react';
-import TagManager from 'react-gtm-module';
+import React, { Component } from 'react';
import Button from 'react-bootstrap/Button';
+import TagManager from 'react-gtm-module';
import styled from 'styled-components';
import AnalyticsActions from '../../../actions/AnalyticsActions';
import TwitterActions from '../../../actions/TwitterActions';
@@ -14,11 +14,13 @@ import VoterEmailAddressEntry from '../../../components/Settings/VoterEmailAddre
import VoterPhoneVerificationEntry from '../../../components/Settings/VoterPhoneVerificationEntry';
import TwitterSignIn from '../../../components/Twitter/TwitterSignIn';
import BrowserPushMessage from '../../../components/Widgets/BrowserPushMessage';
+import ByContinuingNotice from '../../../components/Widgets/ByContinuingNotice.jsx';
import webAppConfig from '../../../config';
import FacebookStore from '../../../stores/FacebookStore';
import VoterStore from '../../../stores/VoterStore';
import initializeAppleSDK from '../../../utils/initializeAppleSDK';
import initializeFacebookSDK from '../../../utils/initializeFacebookSDK';
+import lookupPageNameAndPageTypeDict, { getPageDetails } from '../../../utils/lookupPageNameAndPageTypeDict';
import AppObservableStore, { messageService } from '../../stores/AppObservableStore';
import { isIPhone4in, isIPhone4p7in, restoreStylesAfterCordovaKeyboard } from '../../utils/cordovaUtils';
import { normalizedHref } from '../../utils/hrefUtils';
@@ -29,9 +31,7 @@ import stringContains from '../../utils/stringContains';
import LoadingWheel from '../Widgets/LoadingWheel';
import signInModalGlobalState from '../Widgets/signInModalGlobalState';
import SnackNotifier, { openSnackbar } from '../Widgets/SnackNotifier';
-import lookupPageNameAndPageTypeDict, { getPageDetails } from '../../../utils/lookupPageNameAndPageTypeDict';
-const OpenExternalWebSite = React.lazy(() => import(/* webpackChunkName: 'OpenExternalWebSite' */ '../Widgets/OpenExternalWebSite'));
/* global $ */
const debugMode = false;
@@ -61,6 +61,7 @@ export default class SignInOptionsPanel extends Component {
this.toggleTwitterDisconnectOpen = this.toggleTwitterDisconnectOpen.bind(this);
this.voterSplitIntoTwoAccounts = this.voterSplitIntoTwoAccounts.bind(this);
this.hideDialogForCordovaLocal = this.hideDialogForCordovaLocal.bind(this);
+ this.closeSignInModalLocal = this.closeSignInModalLocal.bind(this);
}
// See https://reactjs.org/docs/error-boundaries.html
@@ -429,8 +430,6 @@ export default class SignInOptionsPanel extends Component {
// 'hideFacebookSignInButton', hideFacebookSignInButton, 'hideDialogForCordova', hideDialogForCordova,
// '\nisOnFacebookSupportedDomainUrl', isOnFacebookSupportedDomainUrl, 'isOnWeVoteRootUrl', isOnWeVoteRootUrl);
- const termsOfServiceURL = `${webAppConfig.WE_VOTE_URL_PROTOCOL + webAppConfig.WE_VOTE_HOSTNAME}/more/terms`;
- const privacyPolicyURL = `${webAppConfig.WE_VOTE_URL_PROTOCOL + webAppConfig.WE_VOTE_HOSTNAME}/privacy`;
const isTinyScreen = isIPhone4in() || isIPhone4p7in() || window.innerWidth <= 375;
return (
@@ -628,40 +627,9 @@ export default class SignInOptionsPanel extends Component {
)}
-
- By continuing, you accept WeVote.US’s
- {' '}
- >}>
-
- Terms of Service
-
- )}
- linkIdAttribute="openTermsOfService"
- target="_blank"
- url={termsOfServiceURL}
- />
-
- {' '}
- and
- {' '}
- >}>
-
- Privacy Policy
-
- )}
- />
-
- .
-
+
+
+
>
@@ -688,7 +656,7 @@ const OrWrapper = styled('div')(({ theme }) => (`
}
`));
-const TermsWrapper = styled('div')(({ theme }) => (`
+const SignInOptionsTermsWrapper = styled('div')(({ theme }) => (`
margin-top: 30px;
// font-weight: 600;
// ${theme.breakpoints.down('sm')} {
diff --git a/src/js/common/utils/isMobileScreenSize.js b/src/js/common/utils/isMobileScreenSize.js
index a1c736dbb..4949b5673 100644
--- a/src/js/common/utils/isMobileScreenSize.js
+++ b/src/js/common/utils/isMobileScreenSize.js
@@ -32,11 +32,6 @@ export function isSmallTablet () {
return innerWidth > tabMin && innerWidth < tabMdMin;
}
-export function isMedOrLgTablet () {
- const { innerWidth, muiThemeGlobal: { breakpoints: { values: { tabMdMin, tabMax } } } } = window;
- return innerWidth > tabMdMin && innerWidth < tabMax;
-}
-
export function isSmallerThanTablet () {
const { innerWidth, muiThemeGlobal: { breakpoints: { values: { tabMin } } } } = window;
return innerWidth < tabMin;
@@ -80,11 +75,12 @@ was .u-show-desktop then this function was uShowDesktop
*/
export function getDesktopBreakpointValue () {
- const { innerWidth, muiThemeGlobal: { breakpoints: { values: { tabMax } } } } = window;
- return tabMax
+ const { muiThemeGlobal: { breakpoints: { values: { tabMax } } } } = window;
+ return tabMax;
}
export function displayNoneIfSmallerThanDesktop () {
+ const { innerWidth } = window;
const tabMax = getDesktopBreakpointValue;
if ((isWebApp() && innerWidth < 991) || (!isWebApp() && innerWidth < tabMax)) {
return 'display: none !important;';
diff --git a/src/js/components/Widgets/ByContinuingNotice.jsx b/src/js/components/Widgets/ByContinuingNotice.jsx
new file mode 100644
index 000000000..36ec9aa04
--- /dev/null
+++ b/src/js/components/Widgets/ByContinuingNotice.jsx
@@ -0,0 +1,43 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { isCordova, isWebApp } from '../../common/utils/isCordovaOrWebApp';
+
+
+
+const ByContinuingNotice = (params) => {
+ const { cordovaClose } = params;
+
+ const closeModal = () => {
+ if (isCordova() && cordovaClose) {
+ cordovaClose();
+ }
+ }
+
+ return (
+ <>
+ By continuing, you accept WeVote.US's
+
+ {' '}
+
+ Terms of Service
+
+ {' '}
+ and
+ {' '}
+
+ Privacy Policy
+
+ .
+ >
+ )
+}
+
+export default ByContinuingNotice;
diff --git a/src/js/components/Widgets/ItemActionBar/ChooseOrOpposeIntroModal.jsx b/src/js/components/Widgets/ItemActionBar/ChooseOrOpposeIntroModal.jsx
index fbfabcaaf..562dcca8d 100644
--- a/src/js/components/Widgets/ItemActionBar/ChooseOrOpposeIntroModal.jsx
+++ b/src/js/components/Widgets/ItemActionBar/ChooseOrOpposeIntroModal.jsx
@@ -6,14 +6,9 @@ import styled, { createGlobalStyle } from 'styled-components';
import AppObservableStore from '../../../common/stores/AppObservableStore';
import VoterStore from '../../../stores/VoterStore';
import PositionPublicToggle from '../../PositionItem/PositionPublicToggle';
-import webAppConfig from '../../../config';
+import ByContinuingNotice from '../ByContinuingNotice';
import ModalDisplayTemplateB from '../ModalDisplayTemplateB';
-const OpenExternalWebSite = React.lazy(() => import(/* webpackChunkName: 'OpenExternalWebSite' */ '../../../common/components/Widgets/OpenExternalWebSite'));
-
-const termsOfServiceURL = `${webAppConfig.WE_VOTE_URL_PROTOCOL + webAppConfig.WE_VOTE_HOSTNAME}/more/terms`;
-const privacyPolicyURL = `${webAppConfig.WE_VOTE_URL_PROTOCOL + webAppConfig.WE_VOTE_HOSTNAME}/privacy`;
-
class ChooseOrOpposeIntroModal extends Component {
constructor (props) {
@@ -151,41 +146,9 @@ class ChooseOrOpposeIntroModal extends Component {
Signing in is optional. Takes about 30 seconds. Free forever.
-
- By continuing, you accept WeVote.US’s
-
- {' '}
- >}>
-
- Terms of Service
-
- )}
- linkIdAttribute="openTermsOfService"
- target="_blank"
- url={termsOfServiceURL}
- />
-
- {' '}
- and
- {' '}
- >}>
-
- Privacy Policy
-
- )}
- />
-
- .
-
+
+
+
>
);
@@ -394,7 +357,7 @@ const SubTitleText = styled('div')`
color: #4B4B4B;
`;
-const TermsWrapper = styled('div')(({ theme }) => (`
+const TermsWrapperChooseOrOppose = styled('div')(({ theme }) => (`
margin-top: 30px;
font-size: 13px;
font-weight: 400;
diff --git a/src/js/components/Widgets/ItemActionBar/MakePublicGateModal.jsx b/src/js/components/Widgets/ItemActionBar/MakePublicGateModal.jsx
index 85811198e..a4f4385a7 100644
--- a/src/js/components/Widgets/ItemActionBar/MakePublicGateModal.jsx
+++ b/src/js/components/Widgets/ItemActionBar/MakePublicGateModal.jsx
@@ -1,20 +1,16 @@
import { Button } from '@mui/material';
import withStyles from '@mui/styles/withStyles';
import PropTypes from 'prop-types';
-import React, { Suspense, useCallback, useEffect, useRef } from 'react';
+import React, { useCallback, useEffect, useRef } from 'react';
import TagManager from 'react-gtm-module';
import styled from 'styled-components';
-import ModalDisplayTemplateA from '../ModalDisplayTemplateA';
import AppObservableStore from '../../../common/stores/AppObservableStore';
import PoliticianStore from '../../../common/stores/PoliticianStore';
import VoterStore from '../../../stores/VoterStore';
import lookupPageNameAndPageTypeDict, { getPageDetails } from '../../../utils/lookupPageNameAndPageTypeDict';
-import webAppConfig from '../../../config';
-
-const OpenExternalWebSite = React.lazy(() => import(/* webpackChunkName: 'OpenExternalWebSite' */ '../../../common/components/Widgets/OpenExternalWebSite'));
+import ByContinuingNotice from '../ByContinuingNotice';
+import ModalDisplayTemplateA from '../ModalDisplayTemplateA';
-const termsOfServiceURL = `${webAppConfig.WE_VOTE_URL_PROTOCOL + webAppConfig.WE_VOTE_HOSTNAME}/more/terms`;
-const privacyPolicyURL = `${webAppConfig.WE_VOTE_URL_PROTOCOL + webAppConfig.WE_VOTE_HOSTNAME}/privacy`;
function MakePublicGateModal ({ classes, politicianWeVoteId }) {
const campaignXWeVoteIdRef = useRef('');
@@ -136,39 +132,7 @@ function MakePublicGateModal ({ classes, politicianWeVoteId }) {
Signing in is optional. Takes about 30 seconds. Free forever.
- By continuing, you accept WeVote.US’s
-
- {' '}
- >}>
-
- Terms of Service
-
- )}
- linkIdAttribute="openTermsOfService"
- target="_blank"
- url={termsOfServiceURL}
- />
-
- {' '}
- and
- {' '}
- >}>
-
- Privacy Policy
-
- )}
- />
-
- .
+
);