Skip to content

Commit

Permalink
Archived pools fixes (#2021)
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser authored Mar 18, 2024
1 parent 0b7bf89 commit d7dc866
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions centrifuge-app/src/components/PoolList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const upcomingPools: PoolCardProps[] = [
export function PoolList() {
const cent = useCentrifuge()
const { search } = useLocation()
const [showArchived, setShowArchived] = React.useState(true)
const [showArchived, setShowArchived] = React.useState(false)
const [listedPools, , metadataIsLoading] = useListedPools()

const centPools = listedPools.filter(({ id }) => !id.startsWith('0x')) as Pool[]
Expand Down Expand Up @@ -108,13 +108,15 @@ export function PoolList() {
</Box>
</Stack>
{!metadataIsLoading && archivedPools.length > 0 && (
<Text color="textSecondary">
<ButtonTextLink onClick={() => setShowArchived((show) => !show)}>
{showArchived ? 'Hide archived pools' : 'View archived pools'}
</ButtonTextLink>
</Text>
<>
<Text color="textSecondary">
<ButtonTextLink onClick={() => setShowArchived((show) => !show)}>
{showArchived ? 'Hide archived pools' : 'View archived pools'}
</ButtonTextLink>
</Text>
{showArchived && <ArchivedPools pools={archivedPools} />}
</>
)}
{showArchived && <ArchivedPools pools={archivedPools} />}
</Stack>
)
}
Expand Down
2 changes: 1 addition & 1 deletion centrifuge-app/src/components/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ const routes: RouteProps[] = [
{ path: '/onboarding/updateInvestorStatus', component: UpdateInvestorStatus, exact: true },
{ path: '/multisig-approval', component: MultisigApprovalPage, exact: true },
{ path: '/swaps', component: SwapsPage },
{ path: '/utils/address-format-converter', component: ConvertAddressPage },
{ path: '/nav-management', component: NavManagementPage },
{ path: '/convert', component: ConvertAddressPage },
{ path: '/', children: <Redirect to="/pools" /> },
{
children: <NotFoundPage />,
Expand Down

0 comments on commit d7dc866

Please sign in to comment.