Skip to content

Commit

Permalink
Add icon particula
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Oct 16, 2024
1 parent 42b2c91 commit afe7919
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
20 changes: 18 additions & 2 deletions centrifuge-app/src/components/PoolOverview/KeyMetrics.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { CurrencyBalance, DailyTrancheState, Price } from '@centrifuge/centrifuge-js'
import { NetworkIcon, formatBalanceAbbreviated, useCentrifuge } from '@centrifuge/centrifuge-react'
import { Box, Card, IconArrowRightWhite, IconMoody, IconSp, Shelf, Stack, Text, Tooltip } from '@centrifuge/fabric'
import {
Box,
Card,
IconArrowRightWhite,
IconMoody,
IconParticula,
IconSp,
Shelf,
Stack,
Text,
Tooltip,
} from '@centrifuge/fabric'
import capitalize from 'lodash/capitalize'
import startCase from 'lodash/startCase'
import { useMemo } from 'react'
Expand Down Expand Up @@ -35,6 +46,11 @@ type Tranche = Pick<DailyTrancheState, 'id'> & {

type TinlakeDataKey = keyof typeof tinlakeData

const ratingIcons: { [key: string]: JSX.Element } = {
"Moody's": <IconMoody size={16} />,
Particula: <IconParticula size={16} />,
}

const tinlakeData = {
'0x53b2d22d07E069a3b132BfeaaD275b10273d381E': '7% - 15%',
'0x55d86d51Ac3bcAB7ab7d2124931FbA106c8b60c7': '4% - 15%',
Expand Down Expand Up @@ -201,7 +217,7 @@ export const KeyMetrics = ({ poolId }: Props) => {
display="flex"
alignItems="center"
>
{rating.agency?.includes("Moody's") ? <IconMoody size={16} /> : <IconSp size={16} />}
{rating.agency && ratingIcons[rating.agency] ? ratingIcons[rating.agency] : <IconSp size={16} />}
<Text style={{ marginLeft: 4 }}>{rating.value}</Text>
</Box>
</Tooltip>
Expand Down
10 changes: 10 additions & 0 deletions fabric/src/icon-svg/Icon-particula.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit afe7919

Please sign in to comment.