diff --git a/apps/governance/src/i18n/translations/dev.json b/apps/governance/src/i18n/translations/dev.json index 38e51b1b1..7988cd5eb 100644 --- a/apps/governance/src/i18n/translations/dev.json +++ b/apps/governance/src/i18n/translations/dev.json @@ -552,9 +552,6 @@ "resourceNotFound": "Resource Not Found", "Or": "Or", "addTokenToWallet": "Show this token in your Ethereum wallet", - "chartBelow": "*Certain activities, for example community incentive tokens, do not have specific dates to be credited and so an approximation has been used. ", - "chartTitle": "Token unlocking schedule", - "chartAbove": "This chart shows the approximate* schedule for how tokens will unlock from vesting tranches over time.", "date": "Date", "noEthereumProviderError": "No Ethereum browser extension detected, install MetaMask on desktop or visit from a dApp browser on mobile", "unsupportedChainIdError": "You're connected to an unsupported network", diff --git a/apps/governance/src/routes/tranches/tranches.tsx b/apps/governance/src/routes/tranches/tranches.tsx index a0fc20273..c0f7bc14a 100644 --- a/apps/governance/src/routes/tranches/tranches.tsx +++ b/apps/governance/src/routes/tranches/tranches.tsx @@ -1,15 +1,12 @@ import { useWeb3React } from '@web3-react/core'; -import React from 'react'; +import { useState } from 'react'; import { useTranslation } from 'react-i18next'; - -import { SubHeading } from '../../components/heading'; -import { TrancheItem } from '../redemption/tranche-item'; -import { TrancheLabel } from './tranche-label'; -import { VestingChart } from './vesting-chart'; import { ButtonLink } from '@vegaprotocol/ui-toolkit'; import { useEthereumConfig } from '@vegaprotocol/web3'; -import type { Tranche } from '../../lib/tranches/tranches-store'; +import { TrancheItem } from '../redemption/tranche-item'; +import { TrancheLabel } from './tranche-label'; import { useTranches } from '../../lib/tranches/tranches-store'; +import type { Tranche } from '../../lib/tranches/tranches-store'; const trancheMinimum = 10; @@ -18,7 +15,7 @@ const shouldShowTranche = (t: Tranche) => export const Tranches = () => { const tranches = useTranches((state) => state.tranches); - const [showAll, setShowAll] = React.useState(false); + const [showAll, setShowAll] = useState(false); const { t } = useTranslation(); const { chainId } = useWeb3React(); const { config } = useEthereumConfig(); @@ -30,10 +27,6 @@ export const Tranches = () => { return (
- -

{t('chartAbove')}

- -

{t('chartBelow')}

{tranches?.length ? (
    {(showAll ? tranches : filteredTranches).map((tranche) => { @@ -55,6 +48,7 @@ export const Tranches = () => { ) : (

    {t('No tranches')}

    )} +
    setShowAll(!showAll)}> {showAll diff --git a/apps/governance/src/routes/tranches/vesting-chart.tsx b/apps/governance/src/routes/tranches/vesting-chart.tsx deleted file mode 100644 index c23bb966d..000000000 --- a/apps/governance/src/routes/tranches/vesting-chart.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import { format, startOfMonth } from 'date-fns'; -import React from 'react'; -import { useTranslation } from 'react-i18next'; -import { - Area, - AreaChart, - Label, - Legend, - ReferenceLine, - ResponsiveContainer, - Tooltip, - XAxis, - YAxis, -} from 'recharts'; -import colors from 'tailwindcss/colors'; - -import { DATE_FORMAT_LONG } from '../../lib/date-formats'; -import data from './data.json'; - -import { theme } from '@vegaprotocol/tailwindcss-config'; -const Colors = theme.colors; - -const ORDER = ['community', 'publicSale', 'earlyInvestors', 'team']; - -export const VestingChart = () => { - const { t } = useTranslation(); - const currentDate = React.useMemo( - () => format(startOfMonth(new Date()), DATE_FORMAT_LONG), - [] - ); - return ( -
    - - - - {[ - ['pink', Colors.vega.pink.DEFAULT], - ['green', Colors.vega.green.DEFAULT], - ['orange', Colors.warning], - ['yellow', Colors.vega.yellow.DEFAULT], - ].map(([key, color]) => ( - - - - - ))} - - { - return ( -
    - {Intl.NumberFormat().format(value)} -
    - ); - }} - // eslint-disable-next-line @typescript-eslint/no-explicit-any - itemSorter={(label: any) => { - return ORDER.indexOf(label.dataKey) + 1; - }} - /> - - - - - - - - - - -
    -
    -
    - ); -};