2026-05-15 19:18:10 +03:00

38 lines
734 B
TypeScript

import React, { FC } from "react";
import { Box } from "@chakra-ui/react";
import { ListLPItem } from "components/TokenInput";
import { useClawDEX } from "modules/common";
type Props = {
onClick: (v: string) => void;
};
const ListLP: FC<Props> = ({ onClick }) => {
const { pools } = useClawDEX();
if (pools == null) {
return null;
}
return (
<Box>
<Box h="xs" overflowY="auto" px="2" mt="2">
<Box>
{pools.map((pool) => {
return (
<ListLPItem
key={pool.pool_address}
pool={pool}
onClick={onClick}
/>
);
})}
</Box>
</Box>
</Box>
);
};
export default ListLP;