-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add shadow background to nav bar #2502
Changes from 7 commits
fb4a4a3
fabd5ce
1b84886
f982b6e
f930811
2470f91
bc46bac
ba4d7dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
import { formatBalance, formatBalanceAbbreviated, formatPercentage } from '../../utils/formatting' | ||
import { CardHeader } from '../ListItemCardStyles' | ||
import { RouterTextLink } from '../TextLink' | ||
import { Tooltips } from '../Tooltips' | ||
import { PoolStatus, PoolStatusKey } from './PoolStatus' | ||
|
||
export type InnerMetadata = { | ||
|
@@ -56,9 +57,16 @@ | |
} | ||
` | ||
|
||
const StyledText = styled(Text)` | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
max-width: 70%; | ||
` | ||
|
||
const tinlakeTranches = { | ||
NS2: { | ||
name: 'New Silver 3', | ||
name: 'New Silver Series 2', | ||
tranches: [ | ||
{ name: 'Junior', apr: '15%', minInvestment: '-' }, | ||
{ name: 'Senior', apr: '7%', minInvestment: '5K' }, | ||
|
@@ -140,16 +148,21 @@ | |
(key) => tinlakeTranches[key as TinlakeTranchesKey].name === name | ||
) || 'none') as TinlakeTranchesKey | ||
|
||
console.log(tinlakeKey, name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. leftover log |
||
|
||
const renderText = (text: string, isApr?: boolean) => { | ||
if (isApr && poolId === NS3_POOL_ID) { | ||
return ( | ||
<Box display="flex"> | ||
<Text fontWeight={500} as="h2" variant={isOneTranche ? 'heading1' : 'body1'} style={{ width: 35 }}> | ||
<Text | ||
fontWeight={500} | ||
as="h2" | ||
variant={isOneTranche ? 'heading1' : 'body1'} | ||
style={{ width: 35, marginRight: 4 }} | ||
> | ||
{text} | ||
</Text> | ||
<Text variant="label2" style={{ alignSelf: 'flex-end', marginLeft: '4px' }}> | ||
Target | ||
</Text> | ||
<Tooltips type="targetAPY" color="textSecondary" label="Target" size="xs" /> | ||
</Box> | ||
) | ||
} | ||
|
@@ -160,7 +173,7 @@ | |
) | ||
} | ||
|
||
const calculateApy = (tranche: TrancheWithCurrency) => { | ||
Check warning on line 176 in centrifuge-app/src/components/PoolCard/index.tsx GitHub Actions / build-app
Check warning on line 176 in centrifuge-app/src/components/PoolCard/index.tsx GitHub Actions / ff-prod / build-app
|
||
const daysSinceCreation = createdAt ? daysBetween(createdAt, new Date()) : 0 | ||
if (poolId === DYF_POOL_ID) return centrifugeTargetAPYs[DYF_POOL_ID][0] | ||
if (poolId === NS3_POOL_ID && tranche.seniority === 0) return centrifugeTargetAPYs[NS3_POOL_ID][0] | ||
|
@@ -273,13 +286,13 @@ | |
|
||
<Box display="flex" justifyContent="space-between" mt={1}> | ||
<Text variant="body3">Asset type</Text> | ||
<Text variant="body3">{assetClass ?? '-'}</Text> | ||
<StyledText variant="body3">{assetClass ?? '-'}</StyledText> | ||
</Box> | ||
<Box display="flex" justifyContent="space-between"> | ||
<Text variant="body3">Investor type</Text> | ||
<Text variant="body3"> | ||
<StyledText variant="body3"> | ||
{isTinlakePool ? tinlakeTranches[tinlakeKey].investorType : metaData?.pool?.investorType ?? '-'} | ||
</Text> | ||
</StyledText> | ||
</Box> | ||
</StyledCard> | ||
</RouterTextLink> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change the margin left to match the margin right?