Skip to content

Commit

Permalink
Fix misplaced data on statistics section on homepage (#1988)
Browse files Browse the repository at this point in the history
* fix: removed unnecessary margin

* fix: adjusted spacing in statistics section

* fix: fraction margin

* fix: fraction margin

* fix: fraction top margin value
  • Loading branch information
dpalikova authored Jan 16, 2025
1 parent 0ef52c2 commit bbea44a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Root = styled('section')(() => ({
export const SectionGridWrapper = styled(Grid)(() => ({
display: 'flex',
margin: '0 auto',
padding: theme.spacing(0, 1.8),
padding: theme.spacing(4, 1.8),
maxWidth: theme.spacing(162),
alignItems: 'center',

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Divider, Grid, Stack, Typography } from '@mui/material'
import { Grid, Stack, Typography } from '@mui/material'
import { styled } from '@mui/material/styles'

import theme from 'common/theme'
Expand All @@ -17,7 +17,6 @@ export const SubtitleSectionNumber = styled(Typography)(() => ({

[theme.breakpoints.up('md')]: {
fontSize: theme.typography.pxToRem(50),
marginTop: theme.spacing(1),
},
}))

Expand All @@ -27,11 +26,7 @@ export const Fraction = styled(Typography)(() => ({
fontWeight: 'bold',
lineHeight: 1,
fontSize: theme.typography.pxToRem(20),
marginTop: theme.spacing(1),

[theme.breakpoints.up('md')]: {
marginTop: theme.spacing(1.87),
},
marginTop: theme.spacing(0.8),
}))

export const StatisticsWrapper = styled(Stack)(() => ({
Expand Down Expand Up @@ -72,7 +67,3 @@ export const SubtitleSectionText = styled(Typography)(() => ({
marginLeft: theme.spacing(2),
fontSize: theme.typography.pxToRem(16),
}))

export const SectionDivider = styled(Divider)(() => ({
marginBottom: theme.spacing(1),
}))
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import { toNumberWithSpacesBetween } from 'common/util/number'

import {
Fraction,
SectionDivider,
StatisticsSectionWrapper,
StatisticsWrapper,
SubtitleSectionNumber,
SubtitleSectionText,
} from './Statistics.styled'
import { Stack } from '@mui/material'
import { Stack, Divider } from '@mui/material'

export default function Statistics() {
const { t } = useTranslation('index')
Expand Down Expand Up @@ -52,7 +51,7 @@ export default function Statistics() {
</SubtitleSectionNumber>
<SubtitleSectionText variant="subtitle1">{section.message}</SubtitleSectionText>
</StatisticsWrapper>
<SectionDivider />
<Divider />
</React.Fragment>
))}
<StatisticsWrapper>
Expand All @@ -64,7 +63,7 @@ export default function Statistics() {
</Stack>
<SubtitleSectionText>{t('platform-statistics.donated-leva')}</SubtitleSectionText>
</StatisticsWrapper>
<SectionDivider />
<Divider />
</StatisticsSectionWrapper>
)
}

0 comments on commit bbea44a

Please sign in to comment.