diff --git a/centrifuge-app/src/components/PoolCard/index.tsx b/centrifuge-app/src/components/PoolCard/index.tsx index 3eaf04289e..408a2e4cec 100644 --- a/centrifuge-app/src/components/PoolCard/index.tsx +++ b/centrifuge-app/src/components/PoolCard/index.tsx @@ -82,7 +82,7 @@ export function PoolCard({ }) : '—'} - {status === 'Upcoming' ? target : ''} + {status === 'Upcoming' && apr ? target : ''} diff --git a/centrifuge-app/src/components/PoolList.tsx b/centrifuge-app/src/components/PoolList.tsx index 017b5017b1..7a3b7d6b92 100644 --- a/centrifuge-app/src/components/PoolList.tsx +++ b/centrifuge-app/src/components/PoolList.tsx @@ -1,12 +1,20 @@ import { Box, Stack } from '@centrifuge/fabric' import * as React from 'react' +import styled from 'styled-components' import { PoolCard, PoolCardProps } from './PoolCard' +import { PoolStatusKey } from './PoolCard/PoolStatus' type PoolListProps = { pools: PoolCardProps[] isLoading?: boolean } +const PoolCardBox = styled(Box)` + &:hover { + cursor: ${(props) => (props.status === 'Upcoming' ? 'not-allowed' : 'default')}; + } +` + export function PoolList({ pools, isLoading }: PoolListProps) { return ( @@ -19,9 +27,9 @@ export function PoolList({ pools, isLoading }: PoolListProps) { )) : pools.map((pool) => ( - + - + ))} ) diff --git a/centrifuge-app/src/pages/Pools.tsx b/centrifuge-app/src/pages/Pools.tsx index 11f7f9f204..e06861c75c 100644 --- a/centrifuge-app/src/pages/Pools.tsx +++ b/centrifuge-app/src/pages/Pools.tsx @@ -31,7 +31,7 @@ export function PoolsPage() { function Pools() { const cent = useCentrifuge() const { search } = useLocation() - const [listedPools, _listedTokens, metadataIsLoading] = useListedPools() + const [listedPools, , metadataIsLoading] = useListedPools() const centPools = listedPools.filter(({ id }) => !id.startsWith('0x')) as Pool[] const centPoolsMetaData: PoolMetaDataPartial[] = useMetadataMulti( @@ -57,7 +57,28 @@ function Pools() { ] const pools = !!listedPools?.length - ? [...upcomingPools, ...poolsToPoolCardProps(listedPools, centPoolsMetaDataById, cent)] + ? [ + ...upcomingPools, + ...poolsToPoolCardProps(listedPools, centPoolsMetaDataById, cent).map((pool) => { + if (pool.name?.includes('Anemoy Liquid Treasury Fund')) { + return { + ...pool, + status: 'Upcoming' as PoolStatusKey, + apr: Rate.fromApr(0.05), + } + } + + return pool + }), + ].sort((a, b) => { + if (a.status === 'Upcoming') { + return -1 + } + if (b.status === 'Upcoming') { + return 1 + } + return 0 + }) : [...upcomingPools] const filteredPools = !!pools?.length ? filterPools(pools, new URLSearchParams(search)) : []