From 9204ecbaf13dd0fcb4445d0b9dfb9dfd48d16712 Mon Sep 17 00:00:00 2001 From: dalemcgrew Date: Thu, 30 Nov 2023 20:59:23 -0800 Subject: [PATCH] A snyk security upgrade moved forward the version of glob we are using, which required a minor syntax change. Also fixed spacing errors caught by ESLINT. Added comment to PoliticianImageDesktop fix. --- src/js/common/components/Style/PoliticianDetailsStyles.jsx | 2 +- src/js/common/node/webPackPostBuild.js | 2 +- src/js/pages/Ballot/Ballot.jsx | 4 ++-- src/js/pages/Campaigns/CampaignsHome.jsx | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/common/components/Style/PoliticianDetailsStyles.jsx b/src/js/common/components/Style/PoliticianDetailsStyles.jsx index 09488305e..015f0e2e6 100644 --- a/src/js/common/components/Style/PoliticianDetailsStyles.jsx +++ b/src/js/common/components/Style/PoliticianDetailsStyles.jsx @@ -46,7 +46,7 @@ export const PoliticianImageMobile = styled('img')` export const PoliticianImageDesktop = styled('img')` border-radius: 5px; height: 100%; - max-height: 200px; + max-height: 200px; // Needs to be revisited when rectangular campaign images are used `; export const PoliticianImageSharedStyles = css` diff --git a/src/js/common/node/webPackPostBuild.js b/src/js/common/node/webPackPostBuild.js index 84c2cf39b..6a6146e9f 100644 --- a/src/js/common/node/webPackPostBuild.js +++ b/src/js/common/node/webPackPostBuild.js @@ -1,5 +1,5 @@ const fs = require('fs'); -const glob = require('glob'); +const { glob } = require('glob'); // builds a tiny html file, that contains the name of the main.hash.js chunk which is // consumed by the WeVote API Server. When the Server is queried by Fastly to generate an index.html diff --git a/src/js/pages/Ballot/Ballot.jsx b/src/js/pages/Ballot/Ballot.jsx index 39e1da4be..3c9938998 100644 --- a/src/js/pages/Ballot/Ballot.jsx +++ b/src/js/pages/Ballot/Ballot.jsx @@ -596,7 +596,7 @@ class Ballot extends Component { if (voter && voter.is_signed_in) { // console.log('onVoterStoreChange, about to historyPush(pathname):', pathname); // Return to the same page without the 'voter_refresh_timer_on' variable - historyPush(pathname, true); + historyPush(pathname, true); } else if (numberOfVoterRetrieveAttempts < 3) { // console.log('About to startTimerToRetrieveVoter'); this.startTimerToRetrieveVoter(); @@ -604,7 +604,7 @@ class Ballot extends Component { // We have exceeded the number of allowed attempts and want to 'turn off' the request to refresh the voter object // Return to the same page without the 'voter_refresh_timer_on' variable // console.log('Exiting voterRefreshTimerOn'); - historyPush(pathname, true); + historyPush(pathname, true); } } else { // console.log('Ballot.jsx onVoterStoreChange VoterStore.getVoter: ', VoterStore.getVoter()); diff --git a/src/js/pages/Campaigns/CampaignsHome.jsx b/src/js/pages/Campaigns/CampaignsHome.jsx index 1b770583d..83bf66bd8 100644 --- a/src/js/pages/Campaigns/CampaignsHome.jsx +++ b/src/js/pages/Campaigns/CampaignsHome.jsx @@ -572,7 +572,7 @@ class CampaignsHome extends Component { const newPathname = this.getStateNamePathnameFromStateCode(e.target.value); const { location: { pathname } } = window; if (pathname !== newPathname) { - historyPush(newPathname); + historyPush(newPathname); } else { this.setState({ stateCode: e.target.value }); } @@ -624,7 +624,7 @@ class CampaignsHome extends Component { render () { renderLog('CampaignsHome'); // Set LOG_RENDER_EVENTS to log all renders - const { + const { campaignList, campaignListTimeStampOfChange, campaignsShowing, candidateListOther, candidateListTimeStampOfChange,