Repository navigation
Expand file tree
/
Copy pathPoolsTable.tsx
More file actions
50 lines (44 loc) · 1.47 KB
/
Copy pathPoolsTable.tsx
File metadata and controls
50 lines (44 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Table, Tbody, Th, Tr, Flex } from '@chakra-ui/react';
import React from 'react';
import type { Pool } from 'types/api/pools';
import { ACTION_BAR_HEIGHT_DESKTOP } from 'ui/shared/ActionBar';
import Hint from 'ui/shared/Hint';
import { default as Thead } from 'ui/shared/TheadSticky';
import PoolsTableItem from './PoolsTableItem';
type Props = {
items: Array<Pool>;
page: number;
isLoading?: boolean;
top?: number;
};
const PoolsTable = ({ items, page, isLoading, top }: Props) => {
return (
<Table minWidth="900px">
<Thead top={ top ?? ACTION_BAR_HEIGHT_DESKTOP }>
<Tr>
<Th width="70%">Pool</Th>
<Th width="30%">DEX </Th>
<Th width="130px" isNumeric>
<Flex alignItems="center" justifyContent="end">
FDV
<Hint
label="Fully Diluted Valuation: theoretical market cap if all tokens were in circulation"
boxSize={ 5 }
ml={ 1 }
/>
</Flex>
</Th>
<Th width="130px" isNumeric>Market cap</Th>
<Th width="130px" isNumeric>Liquidity</Th>
<Th width="75px" isNumeric>View in</Th>
</Tr>
</Thead>
<Tbody>
{ items.map((item, index) => (
<PoolsTableItem key={ item.contract_address + (isLoading ? index : '') } item={ item } index={ index } page={ page } isLoading={ isLoading }/>
)) }
</Tbody>
</Table>
);
};
export default PoolsTable;