diff --git a/centrifuge-app/src/components/PodIndexerReports/index.tsx b/centrifuge-app/src/components/PodIndexerReports/index.tsx index b38fde1944..f9e0713c79 100644 --- a/centrifuge-app/src/components/PodIndexerReports/index.tsx +++ b/centrifuge-app/src/components/PodIndexerReports/index.tsx @@ -1,10 +1,9 @@ import { PoolMetadata, TokenBalance } from '@centrifuge/centrifuge-js' import { formatBalance, useCentrifuge } from '@centrifuge/centrifuge-react' -import { Shelf, Text } from '@centrifuge/fabric' +import { Box, Card, Stack, Text } from '@centrifuge/fabric' import Chart from 'chart.js/auto' import * as React from 'react' import { useQuery } from 'react-query' -import styled from 'styled-components' import { usePool, usePoolMetadata } from '../../utils/usePools' type Props = { @@ -62,22 +61,10 @@ function displayChart(reportSection: ReportSectionWithData, data: ChartData, nod }) } -const Section = styled(Shelf)` - height: 300px; -` - -const SectionContent = styled.div` - text-align: center; -` - function ReportSections({ sections }: { sections: ReportSectionWithData[] }) { - return ( -
- {sections.map((section) => - section.view === 'chart' ? : - )} -
- ) + return sections.map((section) => ( + {section.view === 'chart' ? : } + )) } Chart.defaults.borderColor = '#eee' @@ -95,34 +82,32 @@ function ChartSection({ section }: { section: ReportSectionWithData }) { }, []) return ( -
- - {section.name} - - - - -
+ + + {section.name} + + + + + ) } function CounterSection({ section }: { section: ReportSectionWithData }) { return ( -
- - {section.name} - - - - {formatBalance( - new TokenBalance(section.data[0].value0, section.viewData.decimals || 0), - section.viewData.symbol - )} - - - {section.viewData.label} - - -
+ + + {section.name} + + + {formatBalance( + new TokenBalance(section.data[0].value0, section.viewData.decimals || 0), + section.viewData.symbol + )} + + {section.viewData.label} + + + ) } diff --git a/centrifuge-app/src/pages/Pool/Overview/index.tsx b/centrifuge-app/src/pages/Pool/Overview/index.tsx index cb939fa65b..140e3c23f0 100644 --- a/centrifuge-app/src/pages/Pool/Overview/index.tsx +++ b/centrifuge-app/src/pages/Pool/Overview/index.tsx @@ -150,13 +150,11 @@ export function PoolDetailOverview() { }) || [] } /> + {metadata?.reports && 'poolOverview' in metadata?.reports && ( + + )} - }> - {metadata?.reports && 'poolOverview' in metadata?.reports && ( - - )} - }>