Skip to content

Commit

Permalink
WV-652 Reverted challenge started text to previous iteration, setup c…
Browse files Browse the repository at this point in the history
…hallenge owner to handle up to 4 people's names
  • Loading branch information
Succorro committed Dec 10, 2024
1 parent ecd6d9a commit 535870b
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/js/common/components/Challenge/ChallengeAbout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ function ChallengeAbout ({ challengeWeVoteId, showDaysLeft }) {
)}
</span>
);
const challengeOwnersText = (
<ChallengeOwnersText>
Challenge started by
{' '}
{challengeOwners.slice(0, 3).map((owner, index) => (
<ChallengeOwnersSpan key={owner.organization_we_vote_id}>
{owner.organization_name}
{index < challengeOwners.slice(0, 3).length - 1 ? ', ' : ''}
</ChallengeOwnersSpan>
))}
{challengeOwners.length > 3 && ' and others'}
</ChallengeOwnersText>
);
const remindFriends = 'Remind as many friends as you can about the date of the election, and let them know you will be voting.';
const currentLeader = `Current leader: ${participantNameWithHighestRank}`;
const friendsInvited = (
Expand All @@ -87,7 +100,7 @@ function ChallengeAbout ({ challengeWeVoteId, showDaysLeft }) {
</span>
);

const showStartedBy = false;
const showStartedBy = true;
return (
<ChallengeAboutWrapper>
<CardRowsWrapper>
Expand Down Expand Up @@ -141,13 +154,7 @@ function ChallengeAbout ({ challengeWeVoteId, showDaysLeft }) {
beforeInjection={(svg) => svg.setAttribute('style', { padding: '1px 1px 1px 0px' })}
/>
</SvgImageWrapper>
<ChallengeOwnersDiv>
<ChallengeOwnersText>
Challenge started by
{' '}
{challengeOwners.map((owner) => <ChallengeOwnersSpan key={owner.organization_we_vote_id}>{owner.organization_name}</ChallengeOwnersSpan>)}
</ChallengeOwnersText>
</ChallengeOwnersDiv>
<ChallengeOwnersDiv>{challengeOwnersText}</ChallengeOwnersDiv>
</FlexDivLeft>
)}
</Suspense>
Expand Down

0 comments on commit 535870b

Please sign in to comment.