Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update column alignment in portfolio #1033

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions lib/modules/portfolio/PortfolioTable/PortfolioTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ export const portfolioOrderBy: {
},
]

const numberColumnWidth = '125px'
const furthestLeftColWidth = '140px'

const rowProps = {
px: [0, 4],
gridTemplateColumns: `32px minmax(320px, 1fr) 100px
${furthestLeftColWidth} ${numberColumnWidth} ${numberColumnWidth} 145px`,
gridTemplateColumns: `32px minmax(320px, 1fr) repeat(2, 100px) 120px 130px 170px`,
alignItems: 'center',
gap: { base: 'xxs', xl: 'lg' },
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function PortfolioTableHeader({ currentSortingObj, setCurrentSortingObj,
setCurrentSortingObj({ id: orderByItem.id, desc: false })
}
}}
align="right"
align={index === 0 ? 'left' : 'right'}
/>
))}
</Grid>
Expand Down
12 changes: 5 additions & 7 deletions lib/modules/portfolio/PortfolioTable/PortfolioTableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,14 @@ export function PortfolioTableRow({ pool, keyValue, veBalBoostMap, ...rest }: Pr
{getPoolTypeLabel(pool.type)}
</Text>
</GridItem>
<GridItem display="flex" justifyContent="right">
<GridItem display="flex" justifyContent="left" px="sm">
<HStack>
<Text textAlign="right" fontWeight="medium">
{stakingText}{' '}
</Text>
<Text fontWeight="medium">{stakingText} </Text>
<StakingIcons pool={pool} />
</HStack>
</GridItem>
{/* TO-DO vebal boost */}
<GridItem textAlign="right">
<GridItem px="sm">
<Text
title={toCurrency(pool.dynamicData.volume24h, { abbreviated: false })}
textAlign="right"
Expand All @@ -93,12 +91,12 @@ export function PortfolioTableRow({ pool, keyValue, veBalBoostMap, ...rest }: Pr
{vebalBoostValue ? `${Number(vebalBoostValue).toFixed(2)}x` : '-'}
</Text>
</GridItem>
<GridItem>
<GridItem px="sm">
<Text textAlign="right" fontWeight="medium">
{toCurrency(pool.poolPositionUsd, { abbreviated: false })}
</Text>
</GridItem>
<GridItem justifySelf="end">
<GridItem justifySelf="end" px="sm">
{pool.poolType === ExpandedPoolType.StakedAura ? (
pool.staking?.aura?.apr ? (
<AuraAprTooltip auraApr={pool.staking?.aura?.apr} />
Expand Down
Loading