From 358c82536e8438c1234528fc4a6a301c6887dbb1 Mon Sep 17 00:00:00 2001 From: dalemcgrew Date: Sat, 30 Mar 2024 05:26:11 -0700 Subject: [PATCH] Fix for a problem on the Topics pages. --- .../Organization/OpinionsFollowedList.jsx | 8 ++++++-- .../Organization/OpinionsFollowedListCompressed.jsx | 8 ++++++-- .../components/Organization/OpinionsIgnoredList.jsx | 8 ++++++-- .../OrganizationDisplayForListCompressed.jsx | 8 ++++++-- src/js/components/Organization/OrganizationList.jsx | 13 ++++++++----- src/js/components/VoterGuide/GuideList.jsx | 7 +++++-- src/js/pages/Values/OneValue.jsx | 3 ++- 7 files changed, 39 insertions(+), 16 deletions(-) diff --git a/src/js/components/Organization/OpinionsFollowedList.jsx b/src/js/components/Organization/OpinionsFollowedList.jsx index 0ed66fba1..8921f014e 100644 --- a/src/js/components/Organization/OpinionsFollowedList.jsx +++ b/src/js/components/Organization/OpinionsFollowedList.jsx @@ -1,5 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component, Suspense } from 'react'; +import styled from 'styled-components'; import OrganizationActions from '../../actions/OrganizationActions'; import { renderLog } from '../../common/utils/logging'; import OrganizationDisplayForList from './OrganizationDisplayForList'; @@ -55,12 +56,15 @@ export default class OpinionsFollowedList extends Component { }); return ( -
+ {organizationsList} -
+ ); } } OpinionsFollowedList.propTypes = { organizationsFollowed: PropTypes.array, }; + +const OpinionsFollowedListWrapper = styled('div')` +`; diff --git a/src/js/components/Organization/OpinionsFollowedListCompressed.jsx b/src/js/components/Organization/OpinionsFollowedListCompressed.jsx index 0d4732cf0..1d23fe64e 100644 --- a/src/js/components/Organization/OpinionsFollowedListCompressed.jsx +++ b/src/js/components/Organization/OpinionsFollowedListCompressed.jsx @@ -1,5 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component, Suspense } from 'react'; +import styled from 'styled-components'; import OrganizationActions from '../../actions/OrganizationActions'; import { renderLog } from '../../common/utils/logging'; import OrganizationDisplayForListCompressed from './OrganizationDisplayForListCompressed'; @@ -76,9 +77,9 @@ export default class OpinionsFollowedListCompressed extends Component { }); return ( -
+ {organizationsList} -
+ ); } } @@ -86,3 +87,6 @@ OpinionsFollowedListCompressed.propTypes = { organizationsFollowed: PropTypes.array, editMode: PropTypes.bool, }; + +const OpinionsFollowedListCompressedWrapper = styled('div')` +`; diff --git a/src/js/components/Organization/OpinionsIgnoredList.jsx b/src/js/components/Organization/OpinionsIgnoredList.jsx index 4f8be4e01..ef6cc6307 100644 --- a/src/js/components/Organization/OpinionsIgnoredList.jsx +++ b/src/js/components/Organization/OpinionsIgnoredList.jsx @@ -1,5 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; +import styled from 'styled-components'; import { renderLog } from '../../common/utils/logging'; import OrganizationDisplayForList from './OrganizationDisplayForList'; @@ -35,7 +36,7 @@ export default class OpinionsIgnoredList extends Component { return ( -
+ {this.state.organizationsIgnored.map((organization) => ( ))} -
+ ); } } OpinionsIgnoredList.propTypes = { organizationsIgnored: PropTypes.array, }; + +const OpinionsIgnoredListWrapper = styled('div')` +`; diff --git a/src/js/components/Organization/OrganizationDisplayForListCompressed.jsx b/src/js/components/Organization/OrganizationDisplayForListCompressed.jsx index 0ec6fb6b8..92947af70 100644 --- a/src/js/components/Organization/OrganizationDisplayForListCompressed.jsx +++ b/src/js/components/Organization/OrganizationDisplayForListCompressed.jsx @@ -1,6 +1,7 @@ import PropTypes from 'prop-types'; import React, { Component, Suspense } from 'react'; import { Link } from 'react-router-dom'; +import styled from 'styled-components'; import { renderLog } from '../../common/utils/logging'; const ImageHandler = React.lazy(() => import(/* webpackChunkName: 'ImageHandler' */ '../ImageHandler')); @@ -26,7 +27,7 @@ export default class OrganizationDisplayForListCompressed extends Component { const voterGuideLink = organizationTwitterHandle ? `/${organizationTwitterHandle}` : `/voterguide/${organizationWeVoteId}`; return ( -
+
}> @@ -46,7 +47,7 @@ export default class OrganizationDisplayForListCompressed extends Component {
- + ); } } @@ -57,3 +58,6 @@ OrganizationDisplayForListCompressed.propTypes = { children: PropTypes.array, // A list of the tags in OrganizationDisplayForList when called (from GuideList for example) organization_twitter_handle: PropTypes.string, }; + +const OrganizationDisplayForListCompressedWrapper = styled('div')` +`; diff --git a/src/js/components/Organization/OrganizationList.jsx b/src/js/components/Organization/OrganizationList.jsx index 518cd5f1d..2ea5b91ab 100644 --- a/src/js/components/Organization/OrganizationList.jsx +++ b/src/js/components/Organization/OrganizationList.jsx @@ -137,7 +137,7 @@ class OrganizationList extends Component { ); } return ( -
+ {(organizationListToDisplay && organizationListToDisplayCount) ? (
{organizationListToDisplay.map((organization) => { @@ -172,7 +172,7 @@ class OrganizationList extends Component { )}
) : null} -
+ ); } } @@ -184,13 +184,16 @@ OrganizationList.propTypes = { organizationListIdentifier: PropTypes.string, }; -const ShowMoreItemsWrapper = styled('div')` -`; - const NoSearchResultWrapper = styled.div` display: flex; flex-direction: column; align-items: center; `; +const OrganizationListWrapper = styled('div')` +`; + +const ShowMoreItemsWrapper = styled('div')` +`; + export default (OrganizationList); diff --git a/src/js/components/VoterGuide/GuideList.jsx b/src/js/components/VoterGuide/GuideList.jsx index 161981819..e31619c65 100644 --- a/src/js/components/VoterGuide/GuideList.jsx +++ b/src/js/components/VoterGuide/GuideList.jsx @@ -213,7 +213,7 @@ class GuideList extends Component { ); } return ( -
+ {(filteredOrganizationsWithPositions.length && voterGuideListCount) ? (
{filteredOrganizationsWithPositions.map((organization) => { @@ -249,7 +249,7 @@ class GuideList extends Component { )}
) : null} -
+ ); } } @@ -260,6 +260,9 @@ GuideList.propTypes = { increaseNumberOfItemsOnScroll: PropTypes.bool, }; +const GuideListWrapper = styled('div')` +`; + const ShowMoreItemsWrapper = styled('div')` `; diff --git a/src/js/pages/Values/OneValue.jsx b/src/js/pages/Values/OneValue.jsx index bf3be07e9..ff18568e2 100755 --- a/src/js/pages/Values/OneValue.jsx +++ b/src/js/pages/Values/OneValue.jsx @@ -283,7 +283,8 @@ class OneValue extends Component { }>