vega-frontend-monorepo/apps/token/src/routes/home/index.tsx

145 lines
4.6 KiB
TypeScript
Raw Normal View History

Feat/224 move token app into monorepo (#229) * moved TFE into monorepo with some remaining errors * moved TFE into monorepo with some remaining errors - further files * add tailwind config, use etherscan link from toolkit, use web3 from lib * make app compatible with react router 6 * remove vega keys from app state and use from state from lib * comment out crowdin script injection * convert all buttons to use ui toolkit buttons * remove blueprint inputs and selects and replace with ui-toolkit * remove css resets * tidy button styles in wallet replace splash-screen with version from ui-toolkit * various style fixes * tidy up proposal list * add valid key to route children * Set custom port and config for token e2e tests * added env title e2e test * started some styling fixes - nav and home route * Added 'h-auto' to button height regex check * Added 'h-auto' to regex check to allow desired TFE button height * Removed scss and used tailwind for heading component * Woff files not woof :) * Proper nav h1 font size * Wallet card headings * Vega wallet button styles * Set project to use static hosted alpha font (cors being fixed separately) * Eth wallet button styles (unfinished) * Home route styles * Staking route styles and title calculation * Rewards route styles * Vega wallet container button style * Eth wallet disconnect button * Connect dialog title colour and spacing * Splash screen layout * Fixed a bunch of linting errors * Used 'Object.entries' instead of 'Array.from' to create iterable from object in 'use-search-params' * Removed use of 'any' from 'use-search-params' * Better simplification of 'use-search-params' * Removed package.json duplication errors, set most up-to-date version from duplicate options * Elvis for possible undefined in 'use-add-asset-to-wallet' * Removed redundant files * Removed old todo * Removed package.json redundant packages * Added dark class for dialog h1 text colour (required as the current scss gives a wrong default for this element) * update useAddAsset to use new provider * Ensure Jest has required methods * tidy up package.json * remove ts-ignores and use casts for dynamic grid imports * remove unused code from token-e2e * update to latest types from react 17 * Removed vegag wallet not running component as it should be handled by wallet lib * fix typing of contract addresses * type cast network string to Network enum in reduce * remove comment, issue 270 created instead * default associated wallet amounts to zero * update comment * delete unused staking-overview component, add note about withTranslation types to comment * re add proposal dates * enable source maps for build * add rest of env files for networks * remove crowdin script tags from index.html * add testing-library/jest-dom to types in test tsconfig * setup i18n for tests so that translations are used, proposal change table test * delete unused translation files and config * set sentry release to use commit ref * delete dex liquidity pages * remove unused useVegaLPStaking hook * use found id so no non null assertion needed * remove mocked graphql provider * remove commented out breadcrumb component * add comment and link to issue for syntax highlighter changes * fix any types in token-input, add link to ui-toolkit input changes * dont default allowance to zero as it affects rendering logic * fix spacing between callouts on associate page * adjust spacing between callout for association callout * fix alignment of ethereum splash screen * use ethereum connect dialog state for connect dialog * add infura provider as default * change from infura provider to JsonRpcProvider * remove unused Ethereum config * add custom webpack config to inject sentry plugin * delete commented out code for pending stake * add comment linking input elements issue for eth-address-input * move useEagerConnect to libs/wallet, add logic for connecting state so token app can load after connection has succeeded or failed * remove unused storage files, update web3 connector to render children if not actively connected Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-20 19:37:44 +00:00
import { gql, useQuery } from '@apollo/client';
import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import { Heading } from '../../components/heading';
import { Links } from '../../config';
import { useAppState } from '../../contexts/app-state/app-state-context';
import { useDocumentTitle } from '../../hooks/use-document-title';
import { BigNumber } from '../../lib/bignumber';
import type { RouteChildProps } from '..';
import { Routes } from '../router-config';
import type { NodeData } from './__generated__/NodeData';
import { TokenDetails } from './token-details';
import { Button } from '@vegaprotocol/ui-toolkit';
export const TOTAL_STAKED_QUERY = gql`
query NodeData {
nodeData {
stakedTotal
stakedTotalFormatted @client
}
}
`;
const Home = ({ name }: RouteChildProps) => {
useDocumentTitle(name);
const { t } = useTranslation();
const { appState } = useAppState();
const { data } = useQuery<NodeData>(TOTAL_STAKED_QUERY);
const totalStaked = React.useMemo(() => {
return new BigNumber(data?.nodeData?.stakedTotalFormatted || '0');
}, [data]);
return (
<>
<Heading title={t('pageTitleHome')} />
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
<HomeSection>
<TokenDetails
totalSupply={appState.totalSupply}
totalStaked={totalStaked}
Feat/224 move token app into monorepo (#229) * moved TFE into monorepo with some remaining errors * moved TFE into monorepo with some remaining errors - further files * add tailwind config, use etherscan link from toolkit, use web3 from lib * make app compatible with react router 6 * remove vega keys from app state and use from state from lib * comment out crowdin script injection * convert all buttons to use ui toolkit buttons * remove blueprint inputs and selects and replace with ui-toolkit * remove css resets * tidy button styles in wallet replace splash-screen with version from ui-toolkit * various style fixes * tidy up proposal list * add valid key to route children * Set custom port and config for token e2e tests * added env title e2e test * started some styling fixes - nav and home route * Added 'h-auto' to button height regex check * Added 'h-auto' to regex check to allow desired TFE button height * Removed scss and used tailwind for heading component * Woff files not woof :) * Proper nav h1 font size * Wallet card headings * Vega wallet button styles * Set project to use static hosted alpha font (cors being fixed separately) * Eth wallet button styles (unfinished) * Home route styles * Staking route styles and title calculation * Rewards route styles * Vega wallet container button style * Eth wallet disconnect button * Connect dialog title colour and spacing * Splash screen layout * Fixed a bunch of linting errors * Used 'Object.entries' instead of 'Array.from' to create iterable from object in 'use-search-params' * Removed use of 'any' from 'use-search-params' * Better simplification of 'use-search-params' * Removed package.json duplication errors, set most up-to-date version from duplicate options * Elvis for possible undefined in 'use-add-asset-to-wallet' * Removed redundant files * Removed old todo * Removed package.json redundant packages * Added dark class for dialog h1 text colour (required as the current scss gives a wrong default for this element) * update useAddAsset to use new provider * Ensure Jest has required methods * tidy up package.json * remove ts-ignores and use casts for dynamic grid imports * remove unused code from token-e2e * update to latest types from react 17 * Removed vegag wallet not running component as it should be handled by wallet lib * fix typing of contract addresses * type cast network string to Network enum in reduce * remove comment, issue 270 created instead * default associated wallet amounts to zero * update comment * delete unused staking-overview component, add note about withTranslation types to comment * re add proposal dates * enable source maps for build * add rest of env files for networks * remove crowdin script tags from index.html * add testing-library/jest-dom to types in test tsconfig * setup i18n for tests so that translations are used, proposal change table test * delete unused translation files and config * set sentry release to use commit ref * delete dex liquidity pages * remove unused useVegaLPStaking hook * use found id so no non null assertion needed * remove mocked graphql provider * remove commented out breadcrumb component * add comment and link to issue for syntax highlighter changes * fix any types in token-input, add link to ui-toolkit input changes * dont default allowance to zero as it affects rendering logic * fix spacing between callouts on associate page * adjust spacing between callout for association callout * fix alignment of ethereum splash screen * use ethereum connect dialog state for connect dialog * add infura provider as default * change from infura provider to JsonRpcProvider * remove unused Ethereum config * add custom webpack config to inject sentry plugin * delete commented out code for pending stake * add comment linking input elements issue for eth-address-input * move useEagerConnect to libs/wallet, add logic for connecting state so token app can load after connection has succeeded or failed * remove unused storage files, update web3 connector to render children if not actively connected Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-20 19:37:44 +00:00
/>
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
</HomeSection>
<HomeSection>
<h2 className="text-h4 text-white">{t('Token Vesting')}</h2>
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
<p className="mb-8">
{t(
'The vesting contract holds VEGA tokens until they have become unlocked.'
)}
</p>
<p className="mb-8">
<Trans
i18nKey="Tokens are held in different <trancheLink>Tranches</trancheLink>. Each tranche has its own schedule for how the tokens are unlocked."
components={{
trancheLink: <Link to={Routes.TRANCHES} />,
}}
/>
</p>
<p className="mb-8">
{t(
'Once unlocked they can be redeemed from the contract so that you can transfer them between wallets.'
)}
</p>
<Link to={Routes.VESTING}>
<Button variant="secondary" data-test-id="check-vesting-page-btn">
{t('Check to see if you can redeem unlocked VEGA tokens')}
</Button>
Feat/224 move token app into monorepo (#229) * moved TFE into monorepo with some remaining errors * moved TFE into monorepo with some remaining errors - further files * add tailwind config, use etherscan link from toolkit, use web3 from lib * make app compatible with react router 6 * remove vega keys from app state and use from state from lib * comment out crowdin script injection * convert all buttons to use ui toolkit buttons * remove blueprint inputs and selects and replace with ui-toolkit * remove css resets * tidy button styles in wallet replace splash-screen with version from ui-toolkit * various style fixes * tidy up proposal list * add valid key to route children * Set custom port and config for token e2e tests * added env title e2e test * started some styling fixes - nav and home route * Added 'h-auto' to button height regex check * Added 'h-auto' to regex check to allow desired TFE button height * Removed scss and used tailwind for heading component * Woff files not woof :) * Proper nav h1 font size * Wallet card headings * Vega wallet button styles * Set project to use static hosted alpha font (cors being fixed separately) * Eth wallet button styles (unfinished) * Home route styles * Staking route styles and title calculation * Rewards route styles * Vega wallet container button style * Eth wallet disconnect button * Connect dialog title colour and spacing * Splash screen layout * Fixed a bunch of linting errors * Used 'Object.entries' instead of 'Array.from' to create iterable from object in 'use-search-params' * Removed use of 'any' from 'use-search-params' * Better simplification of 'use-search-params' * Removed package.json duplication errors, set most up-to-date version from duplicate options * Elvis for possible undefined in 'use-add-asset-to-wallet' * Removed redundant files * Removed old todo * Removed package.json redundant packages * Added dark class for dialog h1 text colour (required as the current scss gives a wrong default for this element) * update useAddAsset to use new provider * Ensure Jest has required methods * tidy up package.json * remove ts-ignores and use casts for dynamic grid imports * remove unused code from token-e2e * update to latest types from react 17 * Removed vegag wallet not running component as it should be handled by wallet lib * fix typing of contract addresses * type cast network string to Network enum in reduce * remove comment, issue 270 created instead * default associated wallet amounts to zero * update comment * delete unused staking-overview component, add note about withTranslation types to comment * re add proposal dates * enable source maps for build * add rest of env files for networks * remove crowdin script tags from index.html * add testing-library/jest-dom to types in test tsconfig * setup i18n for tests so that translations are used, proposal change table test * delete unused translation files and config * set sentry release to use commit ref * delete dex liquidity pages * remove unused useVegaLPStaking hook * use found id so no non null assertion needed * remove mocked graphql provider * remove commented out breadcrumb component * add comment and link to issue for syntax highlighter changes * fix any types in token-input, add link to ui-toolkit input changes * dont default allowance to zero as it affects rendering logic * fix spacing between callouts on associate page * adjust spacing between callout for association callout * fix alignment of ethereum splash screen * use ethereum connect dialog state for connect dialog * add infura provider as default * change from infura provider to JsonRpcProvider * remove unused Ethereum config * add custom webpack config to inject sentry plugin * delete commented out code for pending stake * add comment linking input elements issue for eth-address-input * move useEagerConnect to libs/wallet, add logic for connecting state so token app can load after connection has succeeded or failed * remove unused storage files, update web3 connector to render children if not actively connected Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-20 19:37:44 +00:00
</Link>
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
</HomeSection>
<HomeSection>
<h2 className="text-h4 text-white">{t('Use your Vega tokens')}</h2>
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
<p className="mb-8">
{t(
'To use your tokens on the Vega network they need to be associated with a Vega wallet/key.'
)}
</p>
<p className="mb-8">
{t(
'This can happen both while held in the vesting contract as well as when redeemed.'
)}
</p>
<p>
<a
data-test-id="get-vega-wallet-link"
href={Links.WALLET_GUIDE}
className="underline text-white"
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
target="_blank"
rel="nofollow noreferrer"
>
{t('Get a Vega wallet')}
</a>
</p>
<p data-test-id="associate-vega-tokens-link-on-homepage">
<Link
to={`${Routes.STAKING}/associate`}
className="underline text-white"
>
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
{t('Associate VEGA tokens')}
</Link>
</p>
</HomeSection>
<div className="flex gap-40">
<div className="flex-1">
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
<HomeSection>
<h2 className="text-h4 text-white">{t('Staking')}</h2>
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
<p className="mb-8">
{t(
'VEGA token holders can nominate a validator node and receive staking rewards.'
)}
</p>
<p>
<Link to={Routes.STAKING}>
<Button variant="secondary">{t('Nominate a validator')}</Button>
</Link>
</p>
</HomeSection>
Feat/224 move token app into monorepo (#229) * moved TFE into monorepo with some remaining errors * moved TFE into monorepo with some remaining errors - further files * add tailwind config, use etherscan link from toolkit, use web3 from lib * make app compatible with react router 6 * remove vega keys from app state and use from state from lib * comment out crowdin script injection * convert all buttons to use ui toolkit buttons * remove blueprint inputs and selects and replace with ui-toolkit * remove css resets * tidy button styles in wallet replace splash-screen with version from ui-toolkit * various style fixes * tidy up proposal list * add valid key to route children * Set custom port and config for token e2e tests * added env title e2e test * started some styling fixes - nav and home route * Added 'h-auto' to button height regex check * Added 'h-auto' to regex check to allow desired TFE button height * Removed scss and used tailwind for heading component * Woff files not woof :) * Proper nav h1 font size * Wallet card headings * Vega wallet button styles * Set project to use static hosted alpha font (cors being fixed separately) * Eth wallet button styles (unfinished) * Home route styles * Staking route styles and title calculation * Rewards route styles * Vega wallet container button style * Eth wallet disconnect button * Connect dialog title colour and spacing * Splash screen layout * Fixed a bunch of linting errors * Used 'Object.entries' instead of 'Array.from' to create iterable from object in 'use-search-params' * Removed use of 'any' from 'use-search-params' * Better simplification of 'use-search-params' * Removed package.json duplication errors, set most up-to-date version from duplicate options * Elvis for possible undefined in 'use-add-asset-to-wallet' * Removed redundant files * Removed old todo * Removed package.json redundant packages * Added dark class for dialog h1 text colour (required as the current scss gives a wrong default for this element) * update useAddAsset to use new provider * Ensure Jest has required methods * tidy up package.json * remove ts-ignores and use casts for dynamic grid imports * remove unused code from token-e2e * update to latest types from react 17 * Removed vegag wallet not running component as it should be handled by wallet lib * fix typing of contract addresses * type cast network string to Network enum in reduce * remove comment, issue 270 created instead * default associated wallet amounts to zero * update comment * delete unused staking-overview component, add note about withTranslation types to comment * re add proposal dates * enable source maps for build * add rest of env files for networks * remove crowdin script tags from index.html * add testing-library/jest-dom to types in test tsconfig * setup i18n for tests so that translations are used, proposal change table test * delete unused translation files and config * set sentry release to use commit ref * delete dex liquidity pages * remove unused useVegaLPStaking hook * use found id so no non null assertion needed * remove mocked graphql provider * remove commented out breadcrumb component * add comment and link to issue for syntax highlighter changes * fix any types in token-input, add link to ui-toolkit input changes * dont default allowance to zero as it affects rendering logic * fix spacing between callouts on associate page * adjust spacing between callout for association callout * fix alignment of ethereum splash screen * use ethereum connect dialog state for connect dialog * add infura provider as default * change from infura provider to JsonRpcProvider * remove unused Ethereum config * add custom webpack config to inject sentry plugin * delete commented out code for pending stake * add comment linking input elements issue for eth-address-input * move useEagerConnect to libs/wallet, add logic for connecting state so token app can load after connection has succeeded or failed * remove unused storage files, update web3 connector to render children if not actively connected Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-20 19:37:44 +00:00
</div>
<div className="flex-1">
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
<HomeSection>
<h2 className="text-h4 text-white">{t('Governance')}</h2>
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
<p className="mb-8">
{t(
'VEGA token holders can vote on proposed changes to the network and create proposals.'
)}
</p>
<p>
<Link to={Routes.GOVERNANCE}>
<Button variant="secondary">
{t('View Governance proposals')}
</Button>
</Link>
</p>
</HomeSection>
Feat/224 move token app into monorepo (#229) * moved TFE into monorepo with some remaining errors * moved TFE into monorepo with some remaining errors - further files * add tailwind config, use etherscan link from toolkit, use web3 from lib * make app compatible with react router 6 * remove vega keys from app state and use from state from lib * comment out crowdin script injection * convert all buttons to use ui toolkit buttons * remove blueprint inputs and selects and replace with ui-toolkit * remove css resets * tidy button styles in wallet replace splash-screen with version from ui-toolkit * various style fixes * tidy up proposal list * add valid key to route children * Set custom port and config for token e2e tests * added env title e2e test * started some styling fixes - nav and home route * Added 'h-auto' to button height regex check * Added 'h-auto' to regex check to allow desired TFE button height * Removed scss and used tailwind for heading component * Woff files not woof :) * Proper nav h1 font size * Wallet card headings * Vega wallet button styles * Set project to use static hosted alpha font (cors being fixed separately) * Eth wallet button styles (unfinished) * Home route styles * Staking route styles and title calculation * Rewards route styles * Vega wallet container button style * Eth wallet disconnect button * Connect dialog title colour and spacing * Splash screen layout * Fixed a bunch of linting errors * Used 'Object.entries' instead of 'Array.from' to create iterable from object in 'use-search-params' * Removed use of 'any' from 'use-search-params' * Better simplification of 'use-search-params' * Removed package.json duplication errors, set most up-to-date version from duplicate options * Elvis for possible undefined in 'use-add-asset-to-wallet' * Removed redundant files * Removed old todo * Removed package.json redundant packages * Added dark class for dialog h1 text colour (required as the current scss gives a wrong default for this element) * update useAddAsset to use new provider * Ensure Jest has required methods * tidy up package.json * remove ts-ignores and use casts for dynamic grid imports * remove unused code from token-e2e * update to latest types from react 17 * Removed vegag wallet not running component as it should be handled by wallet lib * fix typing of contract addresses * type cast network string to Network enum in reduce * remove comment, issue 270 created instead * default associated wallet amounts to zero * update comment * delete unused staking-overview component, add note about withTranslation types to comment * re add proposal dates * enable source maps for build * add rest of env files for networks * remove crowdin script tags from index.html * add testing-library/jest-dom to types in test tsconfig * setup i18n for tests so that translations are used, proposal change table test * delete unused translation files and config * set sentry release to use commit ref * delete dex liquidity pages * remove unused useVegaLPStaking hook * use found id so no non null assertion needed * remove mocked graphql provider * remove commented out breadcrumb component * add comment and link to issue for syntax highlighter changes * fix any types in token-input, add link to ui-toolkit input changes * dont default allowance to zero as it affects rendering logic * fix spacing between callouts on associate page * adjust spacing between callout for association callout * fix alignment of ethereum splash screen * use ethereum connect dialog state for connect dialog * add infura provider as default * change from infura provider to JsonRpcProvider * remove unused Ethereum config * add custom webpack config to inject sentry plugin * delete commented out code for pending stake * add comment linking input elements issue for eth-address-input * move useEagerConnect to libs/wallet, add logic for connecting state so token app can load after connection has succeeded or failed * remove unused storage files, update web3 connector to render children if not actively connected Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-04-20 19:37:44 +00:00
</div>
</div>
</>
);
};
export default Home;
Feat/304 token tailwind 2 (#396) * remove staking page scss and invalid class for buttons * remove pending stake and staking form scss * make eith wallet buttons fill space * convert app banner and app footer to tailwind * remove low hanging fruit css * add spacing back to home page * fix spacings on various pages * remove custom text helpers and replace with tailwind * Loader component scss to tailwind * Locked progress scss to tailwind * Nav scss to tailwind. Cleaned up structure and removed 'bp3-dark' class from index.html * Page template scss to tailwind * Splash error scss to tailwind * Splash loader scss to tailwind * Token-input scss to tailwind * Stateful button scss to tailwind * Transaction button scss to tailwind * Transactions modal scss to tailwind * Modal scss to tailwind and improved structure * vega-wallet scss to tailwind * wallet-card (and child components in other files tweaked) scss to tailwind * Token details scss to tailwind * Home scss to tailwind * current-proposal-state scss to tailwind * current-proposal-status scss to tailwind * Tweak of modal scss to tailwind * vote-buttons scss to tailwind * vote-details scss to tailwind * vote-progress scss to tailwind * tranche-table scss to tailwind * vesting-table scss to tailwind * withdrawals scss to tailwind * removed reliance on colors.scss from styles.scss * convert tranche item scss * delete unused colors and fonts scss files * convert styles.scss to regular css * Tweak to token e2e tests to account for classname removal Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2022-05-13 11:12:30 +00:00
export const HomeSection = ({ children }: { children: React.ReactNode }) => {
return <section className="mb-20">{children}</section>;
};