Skip to content

Commit

Permalink
Minor layout fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon committed Aug 1, 2024
1 parent 1f64a6d commit 2d76158
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/components/Stats/ChainDetails/ChainCosts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const ChainCosts = () => {
<DetailsGrid
rowGap={0}
columnGap={6}
templateColumns={{ base: '1fr', sm: '1fr 1fr' }}
details={[
{
label: t('stats.price_factors.base', { defaultValue: 'Base' }),
Expand All @@ -41,6 +42,7 @@ export const ChainCosts = () => {
/>
<Text fontWeight={'bold'}>{t('stats.price_factors.factors', { defaultValue: 'Factors' })}</Text>
<DetailsGrid
templateColumns={{ base: '1fr', sm: '1fr 1fr' }}
rowGap={0}
columnGap={6}
details={[
Expand Down
2 changes: 1 addition & 1 deletion src/components/Stats/ChainDetails/ChainInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const ChainInfo = () => {
{t('stats.genesis', { date: genesisBlockDate, defaultValue: 'Genesis {{date}}' })}
</Text>
</HStack>
<DetailsGrid details={statsData} rowGap={1} />
<DetailsGrid templateColumns={{ base: '1fr', sm: '1fr 1fr' }} details={statsData} rowGap={0} />
</Flex>
</StatisticsCardWrapper>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Stats/LatestBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const LatestBlocks = () => {
}

return (
<Stack>
<Stack spacing={4}>
{blocks.map((block, i) => (
<BlockCard key={i} block={block} compact />
))}
Expand Down
11 changes: 6 additions & 5 deletions src/components/Stats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,18 @@ export const StatisticsCardWrapper = ({

const Stats = () => {
const { t } = useTranslation()
const cardSpacing = 4

return (
<Flex direction={'column'} gap={4}>
<Flex direction={'column'} gap={8}>
<StatsCards />
<Flex direction={{ base: 'column-reverse', lg: 'row' }} alignItems='start' gap={4}>
<StatisticsCardWrapper flex='1' minH={'530px'} title={t('stats.latest_blocks')} icon={VscGraphLine}>
<Flex direction={{ base: 'column-reverse', lg: 'row' }} alignItems='start' gap={cardSpacing}>
<StatisticsCardWrapper flex='2' minH={'530px'} title={t('stats.latest_blocks')} icon={VscGraphLine}>
<LatestBlocks />
</StatisticsCardWrapper>
<VStack w={'full'} flex='2'>
<VStack w={'full'} flex='3' spacing={cardSpacing}>
<ChainInfo />
<Flex w={'full'}>
<Flex direction={{ base: 'column', md: 'row' }} w={'full'} gap={cardSpacing}>
<ChainCosts />
<TxCosts />
</Flex>
Expand Down

0 comments on commit 2d76158

Please sign in to comment.