Skip to content

Commit

Permalink
Remove fragment wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ani-kalpachka committed Jul 26, 2023
1 parent 1ce3dde commit 021a4a6
Showing 1 changed file with 50 additions and 52 deletions.
102 changes: 50 additions & 52 deletions src/components/client/campaigns/CampaignCard/CampaignCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,59 +42,57 @@ export default function ActiveCampaignCard({ campaign, index }: Props) {
const reached = summary ? summary.reachedAmount : 0

return (
<>
<Root data-testid={`completed-campaign-${index}`}>
<Link href={routes.campaigns.viewCampaignBySlug(slug)} sx={{ position: 'relative' }}>
<CardMedia
component="img"
height="100%"
image={campaignImagesUrl}
alt={title}
sx={{
maxHeight: theme.spacing(42.5),
<Root data-testid={`completed-campaign-${index}`}>
<Link href={routes.campaigns.viewCampaignBySlug(slug)} sx={{ position: 'relative' }}>
<CardMedia
component="img"
height="100%"
image={campaignImagesUrl}
alt={title}
sx={{
maxHeight: theme.spacing(42.5),

[theme.breakpoints.up('lg')]: {
aspectRatio: '2',
height: theme.spacing(22.3),
maxHeight: 'inherit',
},
[theme.breakpoints.up('lg')]: {
aspectRatio: '2',
height: theme.spacing(22.3),
maxHeight: 'inherit',
},

[theme.breakpoints.up(1430)]: {
height: theme.spacing(27.9),
},
}}
/>
<StyledContent>
<SumWrapper>
<Sum>
<SumNumber>
{i18n.language === 'bg'
? reachedAmount.split(',')[0] + ' лв.'
: reachedAmount.split('.')[0]}
</SumNumber>
</Sum>
<Sum>
<SumNumber>
{i18n.language === 'bg'
? targetAmount.split(',')[0] + ' лв.'
: targetAmount.split('.')[0]}
</SumNumber>
</Sum>
</SumWrapper>
<CampaignProgress campaignId={id} raised={reached} target={target} />
<CampaignTitle>{title}</CampaignTitle>
</StyledContent>
</Link>
<StyledCardActions disableSpacing>
<DonateButton
href={routes.campaigns.oneTimeDonation(slug)}
disabled={campaignState === CampaignState.complete && !allowDonationOnComplete}
variant="contained"
color="secondary">
{t('cta.support')}
</DonateButton>
</StyledCardActions>
</Root>
</>
[theme.breakpoints.up(1430)]: {
height: theme.spacing(27.9),
},
}}
/>
<StyledContent>
<SumWrapper>
<Sum>
<SumNumber>
{i18n.language === 'bg'
? reachedAmount.split(',')[0] + ' лв.'
: reachedAmount.split('.')[0]}
</SumNumber>
</Sum>
<Sum>
<SumNumber>
{i18n.language === 'bg'
? targetAmount.split(',')[0] + ' лв.'
: targetAmount.split('.')[0]}
</SumNumber>
</Sum>
</SumWrapper>
<CampaignProgress campaignId={id} raised={reached} target={target} />
<CampaignTitle>{title}</CampaignTitle>
</StyledContent>
</Link>
<StyledCardActions disableSpacing>
<DonateButton
href={routes.campaigns.oneTimeDonation(slug)}
disabled={campaignState === CampaignState.complete && !allowDonationOnComplete}
variant="contained"
color="secondary">
{t('cta.support')}
</DonateButton>
</StyledCardActions>
</Root>
)
}

0 comments on commit 021a4a6

Please sign in to comment.