Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More lint cleanup in Twitter Sign In, and some Snyk upgrades #3940

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@
},
"dependencies": {
"@emotion/is-prop-valid": "^1.1.2",
"@emotion/react": "^11.10.0",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@loadable/component": "^5.14.1",
"@mui/icons-material": "^5.15.15",
"@loadable/component": "^5.16.4",
"@mui/icons-material": "^5.15.19",
"@mui/lab": "^5.0.0-alpha.96",
"@mui/material": "^5.15.18",
"@mui/styled-engine-sc": "^5.10.1",
Expand Down Expand Up @@ -143,7 +143,7 @@
"react-fullstory": "^1.4.0",
"react-ga4": "^2.1.0",
"react-google-autocomplete": "^2.6.1",
"react-google-button": "^0.7.2",
"react-google-button": "^0.8.0",
"react-google-recaptcha-v3": "^1.10.1",
"react-gtm-module": "^2.0.11",
"react-helmet-async": "^1.3.0",
Expand Down
1 change: 1 addition & 0 deletions src/js/components/Navigation/HamburgerMenuRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class HamburgerMenuRow extends Component {
// "indented" not currently used
return (
<tr className="hamburger-menu__tr">
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<td className="hamburger-menu__td-0">
&nbsp;
</td>
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/Navigation/HeaderBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ class HeaderBar extends Component {
let donateVisible;
const friendsVisible = false; // 2023-09-04 Dale We are turning off Friends header link for now
let howItWorksValue;
//const squadsVisible = isWebApp();
// const squadsVisible = isWebApp();
const squadsVisible = false;
let squadsValue;
// let howItWorksVisible;
Expand Down Expand Up @@ -888,4 +888,4 @@ const StyledHeaderMenuTabs = styled(Tabs)`
// {() => (isIOSAppOnMac() ? '' : displayNoneIfSmallerThanDesktop())};
`;

export default withStyles(styles)(HeaderBar);
export default withStyles(styles)(HeaderBar);
16 changes: 8 additions & 8 deletions src/js/components/Navigation/HeaderBarProfilePopUp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class HeaderBarProfilePopUp extends Component {
renderLog('HeaderBarProfilePopUp'); // Set LOG_RENDER_EVENTS to log all renders
const { classes, isWelcomeMobilePage, voter, profilePopUpOpen } = this.props;
let isSignedIn = false;
let voterOrganizationWeVoteId = '';
let voterTwitterScreenName = '';
// let voterOrganizationWeVoteId = '';
// let voterTwitterScreenName = '';
if (voter) {
({
is_signed_in: isSignedIn,
linked_organization_we_vote_id: voterOrganizationWeVoteId,
twitter_screen_name: voterTwitterScreenName,
// linked_organization_we_vote_id: voterOrganizationWeVoteId,
// twitter_screen_name: voterTwitterScreenName,
} = voter);
}

Expand All @@ -51,9 +51,9 @@ class HeaderBarProfilePopUp extends Component {
return '';
}());

const yourVoterGuideLink = voterTwitterScreenName ?
`/${voterTwitterScreenName}` :
`/voterguide/${voterOrganizationWeVoteId}`;
// const yourVoterGuideLink = voterTwitterScreenName ?
// `/${voterTwitterScreenName}` :
// `/voterguide/${voterOrganizationWeVoteId}`;

return (
<div className={popUpOpen}>
Expand Down Expand Up @@ -237,4 +237,4 @@ const ListItemWrapper = styled('div')`
padding: 5px 0 5px 0;
`;

export default withStyles(styles)(HeaderBarProfilePopUp);
export default withStyles(styles)(HeaderBarProfilePopUp);
8 changes: 4 additions & 4 deletions src/js/components/Twitter/TwitterSignIn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TwitterSignIn extends Component {
const search = url.replace(new RegExp('&amp;', 'g'), '&').replace('wevotetwitterscheme://', '');
const urlParams = new URLSearchParams(search);

urlParams.forEach( (entry) => oAuthLog('urlParams key: ', entry.key, entry.value));
urlParams.forEach((entry) => oAuthLog('urlParams key: ', entry.key, entry.value));

if (urlParams.has('twitter_redirect_url')) {
const redirectURL = urlParams.get('twitter_redirect_url');
Expand Down Expand Up @@ -58,9 +58,9 @@ class TwitterSignIn extends Component {
} else if (urlParams.has('oauth_verifier')) {
if (urlParams.get('success') === 'True') {
oAuthLog('twitterSignIn cordova, received oauth_verifier -- push /twittersigninprocess/');
const oauth_token = urlParams.get('oauth_token');
const oauth_verifier = urlParams.get('oauth_verifier');
historyPush(`/twittersigninprocess/?oauth_token=${oauth_token}&oauth_verifier=${oauth_verifier}`);
const oauthToken = urlParams.get('oauth_token');
const oauthVerifier = urlParams.get('oauth_verifier');
historyPush(`/twittersigninprocess/?oauth_token=${oauthToken}&oauth_verifier=${oauthVerifier}`);
} else {
oAuthLog('twitterSignIn cordova, FAILED to receive valid oauth_verifier -- push /twitter_sign_in');
historyPush('/twitter_sign_in');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export default function EditCandidateForExtension () {

return (
<CandidateForExtensionWrapper>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<a href="https://wevote.us" target="_blank" rel="noreferrer">
<CandidateLogo src={normalizedImagePath('/img/global/svg-icons/we-vote-icon-square-color-dark.svg')} />
</a>
Expand Down
1 change: 1 addition & 0 deletions src/js/pages/Settings/HamburgerMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ export default class HamburgerMenu extends Component {
)}

<tr className="hamburger-terms__tr-terms">
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<td className="hamburger-terms__td" colSpan={3}>
<div style={{ marginTop: 15 }} />
<SettingsSectionFooter centered />
Expand Down
Loading