* fix: fixed mobile issues with SVGs * feat: first morphing AccountDetails * tidy: composition refresh * tidy: fine adjusting * fix: svg fixes * feat: updated summary structure * feat: overall layout adjustments * fix: fixed svg adjustments * feat: finished AccountSummary update * fix: fixed build * tidy: refactor * fix: fix enourmous APYs * fix: don’t abbreviate APYs * tidy: console.log * fix: fix borrow Rate sorting * fix: fixed scrollbars * fix: hide scrollbars * fix: resolved feedback * fix: amount not size * feat: only show credit account number outside of modals * fix: added missing Strategies to PortfolioAccount * fix: save some space
33 lines
970 B
TypeScript
33 lines
970 B
TypeScript
import Text from 'components/common/Text'
|
|
import AssetImage from 'components/common/assets/AssetImage'
|
|
import useAllAssets from 'hooks/assets/useAllAssets'
|
|
export const ASSET_META = {
|
|
accessorKey: 'symbol',
|
|
header: 'Asset',
|
|
id: 'symbol',
|
|
meta: { className: 'w-40' },
|
|
}
|
|
|
|
interface Props {
|
|
symbol: string
|
|
type: PositionType
|
|
}
|
|
|
|
export default function Asset(props: Props) {
|
|
const { symbol, type } = props
|
|
const assets = useAllAssets()
|
|
const asset = assets.find((asset) => asset.symbol === symbol) ?? assets[0]
|
|
|
|
return (
|
|
<div className='flex gap-2'>
|
|
<AssetImage asset={asset} size={16} className='w-4 h-4' />
|
|
<Text size='xs' className='text-white'>
|
|
{asset.symbol}
|
|
{type === 'borrow' && <span className='ml-1 text-loss'>(debt)</span>}
|
|
{type === 'lend' && <span className='ml-1 text-profit'>(lent)</span>}
|
|
{type === 'vault' && <span className='ml-1 text-profit'>(farm)</span>}
|
|
</Text>
|
|
</div>
|
|
)
|
|
}
|