Skip to content

Commit

Permalink
remove performance from deposit page (#203)
Browse files Browse the repository at this point in the history
* remove performance from deposit page

* deps

---------

Co-authored-by: jmzwar <[email protected]>
  • Loading branch information
jmzwar and jmzwar authored Mar 26, 2024
1 parent 22462cd commit 6f0eff3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
22 changes: 3 additions & 19 deletions liquidity/components/PoolBox/PoolBox.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
import { Box, Button, Flex, Heading, Skeleton, Text, Tooltip } from '@chakra-ui/react';
import { Box, Button, Flex, Heading, Skeleton, Text } from '@chakra-ui/react';
import { BorderBox } from '@snx-v3/BorderBox';
import { FC } from 'react';
import { usePoolData } from '@snx-v3/usePoolData';
import { calculatePoolPerformanceSevenDays } from '@snx-v3/calculations';
import { generatePath, Link, useLocation } from 'react-router-dom';
import { Wei } from '@synthetixio/wei';
import { useParams } from '@snx-v3/useParams';
import { InfoIcon } from '@chakra-ui/icons';
import { TrendText } from '@snx-v3/TrendText';
import { currency } from '@snx-v3/format';
import { usePool } from '@snx-v3/usePools';

const PoolBoxUi: FC<{
poolName?: string;
poolId?: string;
sevenDaysPoolPerformanceGrowth?: Wei;
}> = ({ poolName, poolId, sevenDaysPoolPerformanceGrowth }) => {
}> = ({ poolName, poolId }) => {
const location = useLocation();
return (
<BorderBox h="100%" p={4} flexDirection="column">
<BorderBox p={4} flexDirection="column">
{poolId ? (
<Flex justifyContent="space-between">
<Flex flexDirection="column">
Expand All @@ -37,19 +34,6 @@ const PoolBoxUi: FC<{
<Skeleton w={16} height={6} />
</Flex>
)}
{sevenDaysPoolPerformanceGrowth && (
<BorderBox mt={4} p={4} flexDirection="column">
<Heading fontSize="md" alignItems="center" display="flex">
Performance Last 7 Days{' '}
<Tooltip label="Average growth of all markets in the pool for the last 7 days">
<InfoIcon width="12px" height="12px" ml={1} />
</Tooltip>
</Heading>
<TrendText fontSize="2xl" fontWeight="bold" value={sevenDaysPoolPerformanceGrowth}>
{currency(sevenDaysPoolPerformanceGrowth, { style: 'percent' })}
</TrendText>
</BorderBox>
)}
{poolId && (
<Button
as={Link}
Expand Down
3 changes: 0 additions & 3 deletions liquidity/components/PoolBox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
"main": "index.ts",
"version": "0.0.1",
"dependencies": {
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/react": "^2.8.2",
"@snx-v3/BorderBox": "workspace:*",
"@snx-v3/TrendText": "workspace:*",
"@snx-v3/calculations": "workspace:*",
"@snx-v3/format": "workspace:*",
"@snx-v3/useParams": "workspace:*",
"@snx-v3/usePoolData": "workspace:*",
"@snx-v3/usePools": "workspace:*",
Expand Down
5 changes: 1 addition & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6073,12 +6073,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "@snx-v3/PoolBox@workspace:liquidity/components/PoolBox"
dependencies:
"@chakra-ui/icons": "npm:^2.1.1"
"@chakra-ui/react": "npm:^2.8.2"
"@snx-v3/BorderBox": "workspace:*"
"@snx-v3/TrendText": "workspace:*"
"@snx-v3/calculations": "workspace:*"
"@snx-v3/format": "workspace:*"
"@snx-v3/useParams": "workspace:*"
"@snx-v3/usePoolData": "workspace:*"
"@snx-v3/usePools": "workspace:*"
Expand Down Expand Up @@ -6174,7 +6171,7 @@ __metadata:
languageName: unknown
linkType: soft

"@snx-v3/TrendText@workspace:*, @snx-v3/TrendText@workspace:liquidity/components/TrendText":
"@snx-v3/TrendText@workspace:liquidity/components/TrendText":
version: 0.0.0-use.local
resolution: "@snx-v3/TrendText@workspace:liquidity/components/TrendText"
dependencies:
Expand Down

0 comments on commit 6f0eff3

Please sign in to comment.