From 4c5a026a03a922784c6dd5fb9473c5615e9accca Mon Sep 17 00:00:00 2001 From: mattrussell36 Date: Fri, 24 Jun 2022 00:08:17 +0000 Subject: [PATCH 1/5] chore: update tranches Signed-off-by: github-actions[bot] --- apps/static/src/assets/mainnet-tranches.json | 28 +++++++++---------- apps/static/src/assets/stagnet1-tranches.json | 4 +-- apps/static/src/assets/testnet-tranches.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/static/src/assets/mainnet-tranches.json b/apps/static/src/assets/mainnet-tranches.json index 6ba07d4e7..81fd8751c 100644 --- a/apps/static/src/assets/mainnet-tranches.json +++ b/apps/static/src/assets/mainnet-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "129999.45", "total_removed": "0", - "locked_amount": "125550.67163847386329389", + "locked_amount": "125490.807950476487042685", "deposits": [ { "amount": "129999.45", @@ -488,7 +488,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "97499.58", "total_removed": "0", - "locked_amount": "66375.714926165134519854", + "locked_amount": "66316.994224794485255034", "deposits": [ { "amount": "97499.58", @@ -521,7 +521,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "135173.4239508", "total_removed": "0", - "locked_amount": "90724.1430149405949586301724", + "locked_amount": "90643.88195387308072600001124", "deposits": [ { "amount": "135173.4239508", @@ -554,7 +554,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "32499.86", "total_removed": "0", - "locked_amount": "27923.117022151803344928", + "locked_amount": "27898.414237137437972002", "deposits": [ { "amount": "32499.86", @@ -587,7 +587,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "10833.29", "total_removed": "0", - "locked_amount": "9088.703631196554874002", + "locked_amount": "9080.663114384531104214", "deposits": [ { "amount": "10833.29", @@ -675,7 +675,7 @@ "tranche_end": "2022-11-01T00:00:00.000Z", "total_added": "22500", "total_removed": "0", - "locked_amount": "15926.89509737318925", + "locked_amount": "15896.03713768116", "deposits": [ { "amount": "15000", @@ -761,7 +761,7 @@ "tranche_end": "2023-06-02T00:00:00.000Z", "total_added": "1939928.38", "total_removed": "0", - "locked_amount": "1824311.884226555593124554", + "locked_amount": "1822970.678668807853945032", "deposits": [ { "amount": "1852091.69", @@ -1777,7 +1777,7 @@ "tranche_end": "2022-09-30T00:00:00.000Z", "total_added": "60916.66666633337", "total_removed": "18323.723696937179372649", - "locked_amount": "15345.7844080554792796843344487108", + "locked_amount": "15306.3682731039740734908198632655", "deposits": [ { "amount": "2833.333333", @@ -5195,7 +5195,7 @@ "tranche_end": "2022-09-03T00:00:00.000Z", "total_added": "19455.000000000000000003", "total_removed": "5052.45813105178", - "locked_amount": "3797.54184693683445435058558856544901071", + "locked_amount": "3784.09127092846266615058351445966514459", "deposits": [ { "amount": "75", @@ -14079,7 +14079,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "3732368.4671", "total_removed": "74162.9780761646031", - "locked_amount": "2827833.53284815265111086312", + "locked_amount": "2825772.56686407347662679409", "deposits": [ { "amount": "1998.95815", @@ -14792,7 +14792,7 @@ "tranche_end": "2023-12-05T00:00:00.000Z", "total_added": "15788853.065470999700000001", "total_removed": "6529.308282907170975", - "locked_amount": "15248534.5651159366987063864185024232049202", + "locked_amount": "15241263.9268651766107607533249140013490133", "deposits": [ { "amount": "16249.93", @@ -16844,7 +16844,7 @@ "tranche_end": "2023-05-05T00:00:00.000Z", "total_added": "14597706.0446472999", "total_removed": "2069544.949743920512285522", - "locked_amount": "8428346.7523447924808560906348842", + "locked_amount": "8421600.00442873217934019067094039", "deposits": [ { "amount": "129284.449", @@ -20892,7 +20892,7 @@ "tranche_end": "2023-04-05T00:00:00.000Z", "total_added": "5778205.3912159303", "total_removed": "1390546.591547348229906227", - "locked_amount": "3013187.37252800835890024298674749", + "locked_amount": "3010521.69162238133617791763807002", "deposits": [ { "amount": "552496.6455", @@ -22015,7 +22015,7 @@ "tranche_end": "2023-06-05T00:00:00.000Z", "total_added": "472355.6199999996", "total_removed": "0", - "locked_amount": "448086.38786540236946778559309992", + "locked_amount": "447759.81602424111903313103094876", "deposits": [ { "amount": "3000", diff --git a/apps/static/src/assets/stagnet1-tranches.json b/apps/static/src/assets/stagnet1-tranches.json index 138fea77b..204e6dae1 100644 --- a/apps/static/src/assets/stagnet1-tranches.json +++ b/apps/static/src/assets/stagnet1-tranches.json @@ -38,7 +38,7 @@ "tranche_end": "2022-11-26T13:48:10.000Z", "total_added": "100", "total_removed": "0", - "locked_amount": "42.69090246067986", + "locked_amount": "42.62175925925926", "deposits": [ { "amount": "100", @@ -242,7 +242,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1100", "total_removed": "673.04388635", - "locked_amount": "332.36188165905626", + "locked_amount": "331.601306443429715", "deposits": [ { "amount": "1000", diff --git a/apps/static/src/assets/testnet-tranches.json b/apps/static/src/assets/testnet-tranches.json index 1ad29cceb..c48a90368 100644 --- a/apps/static/src/assets/testnet-tranches.json +++ b/apps/static/src/assets/testnet-tranches.json @@ -69,7 +69,7 @@ "tranche_end": "2022-10-12T00:53:20.000Z", "total_added": "1010.000000000000000001", "total_removed": "668.4622323651", - "locked_amount": "305.16870084982244640030214722856418064", + "locked_amount": "304.47029046169455650030145573313039065", "deposits": [ { "amount": "1000", From 2302ef4378b56d88736b4f629927fa8ca3fe0142 Mon Sep 17 00:00:00 2001 From: Sam Keen Date: Fri, 24 Jun 2022 04:16:01 +0100 Subject: [PATCH 2/5] feat(#447): 447 - UI toolkit and theme updates * feat: 447 Refactored 'progress' intent to be 'prompt' as now white. Added yellow 'selected' intent * feat: 447 Colour consolidation * feat: 447 Colour consolidation extra renaming * feat: 447 Fixing specified red colours * feat: 447 Removed unused darker red * feat: 447 Documenting additional colours in storybook * feat: 447 Buttons updated (except 'accent', which will probably get removed when navs built) * feat: 447 Text inputs updated * feat:frontend-monorepo-447: Trading nav * feat:frontend-monorepo-447: Updated toggle button colours * feat:frontend-monorepo-447: Custom checkboxes * feat:frontend-monorepo-447: Tweaks to radio buttons * feat:frontend-monorepo-447: Input dates get dark color scheme in dark mode * feat:frontend-monorepo-447: Dropdown updates * feat:frontend-monorepo-447: Icon menu * feat:frontend-monorepo-447: Focus visual styles moved to focus-visible for radios and toggle * feat:frontend-monorepo-447: Tweak to focus styles for text input and textarea * feat:frontend-monorepo-447: Labeled input * feat:frontend-monorepo-447: Labeled input description red when in error * feat:frontend-monorepo-447: Tooltip visual update * feat:frontend-monorepo-447: Added disabled state to checkbox * feat:frontend-monorepo-447: Custom select with radix * feat:frontend-monorepo-447: Reverted back to native Select for a11y concerns * feat:frontend-monorepo-447: Added visual cue for dropdown items when multiple can be selected * feat:frontend-monorepo-447: Removed shadow from buttons in Explorer where it looked wrong * feat:frontend-monorepo-447: Added box shadow classes into tailwind theme * feat:frontend-monorepo-447: Colour primitives documentation updated * feat:frontend-monorepo-447: Cleaning up box shadow use further * feat:frontend-monorepo-447: Intents util updated * feat:frontend-monorepo-447: Dialog component updated * feat:frontend-monorepo-447: Callout component updated * feat:frontend-monorepo-447: Adjusted apps to handle toolkit changes * feat:frontend-monorepo-447: Moved tabs to ui-toolkit and styled * feat:frontend-monorepo-447: Fixed ui-toolkit tests * feat:frontend-monorepo-447: Token eth wallet made dark to support new buttons * feat:frontend-monorepo-447: Ran prettier * frontend-monorepo-447: Simplified button class functions and exported for use on other elements * frontend-monorepo-447: Used newly exported button classes on Link elements in eth-wallet * frontend-monorepo-447: Moved trading nav from ui-toolkit to trading app * frontend-monorepo-447: Simplified intents and updated stories * frontend-monorepo-447: Using classnames in requested spot * frontend-monorepo-447: Removed unnecessary 'asChild' prop on dropdown triggers * frontend-monorepo-447: Made use of the XPrimitive Radix naming convention * frontend-monorepo-447: Simplified types in 'getButtonClasses' * frontend-monorepo-447: Added 'asChild' to dropdown trigger to avoid nested buttons * frontend-monorepo-447: Moved input label and description into Formgroup component. Refactored based on tweaked structure * frontend-monorepo-447: Externally linked input label * frontend-monorepo-447: Adding correct text colours to Intent.None backgrounds * frontend-monorepo-447: Improved intent function name * frontend-monorepo-447: Removed new navbar until implementation ticket is picked up * frontend-monorepo-447: using testing-library/user-event for tab click unit tests * frontend-monorepo-447: Removed unused button import * frontend-monorepo-447: Little extra use of classnames in form-group.tsx * feat: make navbar pink for light mode * fix: problem with theme not switching when dependent in js on theme value * fix: bg of row hover * fix: dont use vega pink for sell red * fix: type error in generate orders func * fix: lint Co-authored-by: Matthew Russell --- .../src/app/components/jump-to/index.tsx | 7 +- .../src/app/components/search/search.tsx | 7 +- .../app/components/drawer/drawer-toggle.tsx | 2 +- .../simple-market-list/simple-market-list.tsx | 2 +- .../src/app/components/stepper/stepper.tsx | 2 +- .../src/components/eth-wallet/eth-wallet.tsx | 34 ++-- .../locked-progress/locked-progress.tsx | 41 +++-- .../components/vega-wallet/vega-wallet.tsx | 12 +- apps/token/src/index.html | 2 +- .../routes/claim/target-address-mismatch.tsx | 2 +- .../token/src/routes/staking/staking-node.tsx | 4 +- .../src/routes/tranches/tranche-progress.tsx | 2 +- .../src/routes/tranches/vesting-chart.tsx | 4 +- .../src/support/mocks/generate-orders.ts | 1 + apps/trading/components/navbar/navbar.tsx | 21 +-- apps/trading/pages/_app.page.tsx | 134 ++++++++------- apps/trading/pages/markets/trade-grid.tsx | 58 +++---- apps/trading/pages/portfolio/index.page.tsx | 39 +++-- libs/candles-chart/src/lib/candles-chart.tsx | 27 ++-- .../src/components/deal-ticket.tsx | 2 +- libs/tailwindcss-config/src/theme.js | 153 ++++++++++-------- .../src/vega-custom-classes.js | 19 +++ libs/trades/src/lib/trades-table.tsx | 2 +- .../src/components/ag-grid/ag-grid-light.tsx | 2 +- .../src/components/button/button.stories.tsx | 45 ++++-- .../src/components/button/button.tsx | 153 +++++++++--------- .../src/components/callout/callout.spec.tsx | 12 +- .../components/callout/callout.stories.tsx | 16 +- .../src/components/callout/callout.tsx | 13 +- .../src/components/checkbox/checkbox.spec.tsx | 64 ++++++++ .../components/checkbox/checkbox.stories.tsx | 45 ++++++ .../src/components/checkbox/checkbox.tsx | 81 ++++++++++ .../src/components/checkbox/index.ts | 1 + .../src/components/dialog/dialog.stories.tsx | 34 ++-- .../src/components/dialog/dialog.tsx | 10 +- .../dropdown-menu/dropdown-menu.stories.tsx | 45 ++++-- .../dropdown-menu/dropdown-menu.tsx | 72 ++++++--- .../src/components/form-group/form-group.tsx | 29 +++- .../form-group/from-group.stories.tsx | 32 +++- .../src/components/grid-tabs/index.ts | 1 - libs/ui-toolkit/src/components/index.ts | 3 +- .../src/components/indicator/indicator.tsx | 4 +- .../ui-toolkit/src/components/input/input.tsx | 17 +- .../src/components/lozenge/lozenge.tsx | 4 +- .../price-change/price-change-cell.tsx | 4 +- .../components/radio-group/radio-group.tsx | 5 +- .../src/components/select/select.stories.tsx | 4 +- .../src/components/select/select.tsx | 4 +- .../components/sparkline/sparkline.spec.tsx | 4 +- .../src/components/sparkline/sparkline.tsx | 4 +- libs/ui-toolkit/src/components/tabs/index.ts | 1 + .../src/components/tabs/tabs.spec.tsx | 33 ++++ .../src/components/tabs/tabs.stories.tsx | 21 +++ .../grid-tabs.tsx => tabs/tabs.tsx} | 48 +++--- .../src/components/text-area/text-area.tsx | 4 +- .../src/components/toggle/toggle.tsx | 7 +- .../components/tooltip/tooltip.stories.tsx | 2 +- .../src/components/tooltip/tooltip.tsx | 14 +- ...enge.stories.tsx => vega-logo.stories.tsx} | 0 .../src/primitives/colors.stories.mdx | 41 ++++- libs/ui-toolkit/src/utils/intent.tsx | 38 +++-- libs/ui-toolkit/src/utils/shared.ts | 36 +++-- libs/wallet/src/manage-dialog.tsx | 2 +- libs/web3/src/lib/web3-connect-dialog.tsx | 2 +- package.json | 2 + yarn.lock | 37 +++++ 66 files changed, 1047 insertions(+), 526 deletions(-) create mode 100644 libs/ui-toolkit/src/components/checkbox/checkbox.spec.tsx create mode 100644 libs/ui-toolkit/src/components/checkbox/checkbox.stories.tsx create mode 100644 libs/ui-toolkit/src/components/checkbox/checkbox.tsx create mode 100644 libs/ui-toolkit/src/components/checkbox/index.ts delete mode 100644 libs/ui-toolkit/src/components/grid-tabs/index.ts create mode 100644 libs/ui-toolkit/src/components/tabs/index.ts create mode 100644 libs/ui-toolkit/src/components/tabs/tabs.spec.tsx create mode 100644 libs/ui-toolkit/src/components/tabs/tabs.stories.tsx rename libs/ui-toolkit/src/components/{grid-tabs/grid-tabs.tsx => tabs/tabs.tsx} (55%) rename libs/ui-toolkit/src/components/vega-logo/{lozenge.stories.tsx => vega-logo.stories.tsx} (100%) diff --git a/apps/explorer/src/app/components/jump-to/index.tsx b/apps/explorer/src/app/components/jump-to/index.tsx index c1807a9e3..c00f47de8 100644 --- a/apps/explorer/src/app/components/jump-to/index.tsx +++ b/apps/explorer/src/app/components/jump-to/index.tsx @@ -36,7 +36,12 @@ export const JumpTo = ({ placeholder={placeholder} className="max-w-[200px]" /> - diff --git a/apps/explorer/src/app/components/search/search.tsx b/apps/explorer/src/app/components/search/search.tsx index 3c33ffb47..ea4e9e932 100644 --- a/apps/explorer/src/app/components/search/search.tsx +++ b/apps/explorer/src/app/components/search/search.tsx @@ -75,7 +75,12 @@ export const Search = () => { )} - diff --git a/apps/simple-trading-app/src/app/components/drawer/drawer-toggle.tsx b/apps/simple-trading-app/src/app/components/drawer/drawer-toggle.tsx index a9fbc02b7..aec0e1c18 100644 --- a/apps/simple-trading-app/src/app/components/drawer/drawer-toggle.tsx +++ b/apps/simple-trading-app/src/app/components/drawer/drawer-toggle.tsx @@ -35,7 +35,7 @@ export const DrawerToggle = ({ }, [variant]); return ( - ); diff --git a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx index 831470e8d..f5ae85aab 100644 --- a/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx +++ b/apps/simple-trading-app/src/app/components/simple-market-list/simple-market-list.tsx @@ -101,7 +101,7 @@ const SimpleMarketList = () => {
diff --git a/apps/simple-trading-app/src/app/components/stepper/stepper.tsx b/apps/simple-trading-app/src/app/components/stepper/stepper.tsx index 3a9bb0006..3d099ffa5 100644 --- a/apps/simple-trading-app/src/app/components/stepper/stepper.tsx +++ b/apps/simple-trading-app/src/app/components/stepper/stepper.tsx @@ -70,7 +70,7 @@ export default ({ steps }: StepperProps) => { {index === steps.length - 1 ? 'Finish' : 'Continue'} @@ -215,7 +220,8 @@ export const EthWallet = () => { {account ? ( ) : ( - + )} {account && ( diff --git a/apps/token/src/components/locked-progress/locked-progress.tsx b/apps/token/src/components/locked-progress/locked-progress.tsx index 3c12cb031..c1cf2cc3b 100644 --- a/apps/token/src/components/locked-progress/locked-progress.tsx +++ b/apps/token/src/components/locked-progress/locked-progress.tsx @@ -1,8 +1,8 @@ import React from 'react'; - import { formatNumber } from '../../lib/format-number'; import type { BigNumber } from '../../lib/bignumber'; import { theme } from '@vegaprotocol/tailwindcss-config'; +import classnames from 'classnames'; const Colors = theme.colors; @@ -14,9 +14,10 @@ const ProgressContents = ({ children: React.ReactNode; }) => (
{children}
@@ -25,17 +26,22 @@ const ProgressContents = ({ const ProgressIndicator = ({ bgColor, side, + light, }: { bgColor: string; side: 'left' | 'right'; + light: boolean; }) => ( ); @@ -73,7 +79,7 @@ export const LockedProgress = ({ leftLabel, rightLabel, leftColor = Colors.vega.pink, - rightColor = Colors.green.DEFAULT, + rightColor = Colors.vega.green, light = false, }: LockedProgressProps) => { const lockedPercentage = React.useMemo(() => { @@ -85,19 +91,28 @@ export const LockedProgress = ({ }, [total, unlocked]); return ( -
-
+ <> +
- + {leftLabel} {rightLabel} - + @@ -105,6 +120,6 @@ export const LockedProgress = ({ {formatNumber(locked, 2)} {formatNumber(unlocked, 2)} -
+ ); }; diff --git a/apps/token/src/components/vega-wallet/vega-wallet.tsx b/apps/token/src/components/vega-wallet/vega-wallet.tsx index 79b582949..307e6f392 100644 --- a/apps/token/src/components/vega-wallet/vega-wallet.tsx +++ b/apps/token/src/components/vega-wallet/vega-wallet.tsx @@ -180,15 +180,15 @@ const VegaWalletConnected = ({ vegaKeys }: VegaWalletConnectedProps) => {
))} - - + + - - + + diff --git a/apps/token/src/index.html b/apps/token/src/index.html index 6396c83af..33627cdd5 100644 --- a/apps/token/src/index.html +++ b/apps/token/src/index.html @@ -1,5 +1,5 @@ - + diff --git a/apps/token/src/routes/claim/target-address-mismatch.tsx b/apps/token/src/routes/claim/target-address-mismatch.tsx index 6f5e9eb7c..23069ac69 100644 --- a/apps/token/src/routes/claim/target-address-mismatch.tsx +++ b/apps/token/src/routes/claim/target-address-mismatch.tsx @@ -25,7 +25,7 @@ export const TargetAddressMismatch = ({ }} components={{ bold: , - red: , + red: , }} />

diff --git a/apps/token/src/routes/staking/staking-node.tsx b/apps/token/src/routes/staking/staking-node.tsx index a29452b4b..9724c73bb 100644 --- a/apps/token/src/routes/staking/staking-node.tsx +++ b/apps/token/src/routes/staking/staking-node.tsx @@ -88,7 +88,9 @@ export const StakingNode = ({ vegaKey, data }: StakingNodeProps) => { if (!nodeInfo) { return ( - {t('stakingNodeNotFound', { node })} + + {t('stakingNodeNotFound', { node })} + ); } diff --git a/apps/token/src/routes/tranches/tranche-progress.tsx b/apps/token/src/routes/tranches/tranche-progress.tsx index 213f5b66c..fb970e685 100644 --- a/apps/token/src/routes/tranches/tranche-progress.tsx +++ b/apps/token/src/routes/tranches/tranche-progress.tsx @@ -40,7 +40,7 @@ export const TrancheProgress = ({ {t('Redeemed')} diff --git a/apps/token/src/routes/tranches/vesting-chart.tsx b/apps/token/src/routes/tranches/vesting-chart.tsx index 767d38ce5..d838ec296 100644 --- a/apps/token/src/routes/tranches/vesting-chart.tsx +++ b/apps/token/src/routes/tranches/vesting-chart.tsx @@ -36,7 +36,7 @@ export const VestingChart = () => { ['pink', Colors.vega.pink], ['green', Colors.vega.green], ['orange', Colors.orange], - ['yellow', Colors.yellow.DEFAULT], + ['yellow', Colors.vega.yellow], ].map(([key, color]) => ( @@ -119,7 +119,7 @@ export const VestingChart = () => { dot={false} type="monotone" dataKey="publicSale" - stroke={Colors.yellow.DEFAULT} + stroke={Colors.vega.yellow} fill="url(#yellow)" yAxisId={0} strokeWidth={2} diff --git a/apps/trading-e2e/src/support/mocks/generate-orders.ts b/apps/trading-e2e/src/support/mocks/generate-orders.ts index 3e5bc8946..6c7219f62 100644 --- a/apps/trading-e2e/src/support/mocks/generate-orders.ts +++ b/apps/trading-e2e/src/support/mocks/generate-orders.ts @@ -76,6 +76,7 @@ export const generateOrders = (override?: PartialDeep): Orders => { id: 'c6f4337b31ed57a961969c3ba10297b369d01b9e75a4cbb96db4fc62886444e6', name: 'BTCUSD Monthly (30 Jun 2022)', decimalPlaces: 5, + positionDecimalPlaces: 0, tradableInstrument: { __typename: 'TradableInstrument', instrument: { diff --git a/apps/trading/components/navbar/navbar.tsx b/apps/trading/components/navbar/navbar.tsx index 1384dc92f..801f5ac8b 100644 --- a/apps/trading/components/navbar/navbar.tsx +++ b/apps/trading/components/navbar/navbar.tsx @@ -1,8 +1,8 @@ import { useRouter } from 'next/router'; import { Vega } from '../icons/vega'; import Link from 'next/link'; -import { AnchorButton } from '@vegaprotocol/ui-toolkit'; import { t } from '@vegaprotocol/react-helpers'; +import classNames from 'classnames'; export const Navbar = () => { return ( @@ -33,14 +33,17 @@ const NavLink = ({ name, path, exact, testId = name }: NavLinkProps) => { const router = useRouter(); const isActive = router.asPath === path || (!exact && router.asPath.startsWith(path)); + const linkClasses = classNames( + 'px-16 py-6 border-0 self-end', + 'uppercase xs:text-ui sm:text-body-large md:text-h5 lg:text-h4', + { + 'bg-vega-pink dark:bg-vega-yellow text-white dark:text-black': isActive, + 'text-black dark:text-white': !isActive, + } + ); return ( - - {name} - + + {name} + ); }; diff --git a/apps/trading/pages/_app.page.tsx b/apps/trading/pages/_app.page.tsx index 38aaf4014..e5e10d23a 100644 --- a/apps/trading/pages/_app.page.tsx +++ b/apps/trading/pages/_app.page.tsx @@ -24,84 +24,80 @@ function AppBody({ Component, pageProps }: AppProps) { const { push } = useRouter(); const store = useGlobalStore(); const { VEGA_NETWORKS } = useEnvironment(); - const [, toggleTheme] = useThemeSwitcher(); + const [theme, toggleTheme] = useThemeSwitcher(); return ( -
- -
- -
- { - store.setVegaWalletConnectDialog(open); - }} - setManageDialog={(open) => { - store.setVegaWalletManageDialog(open); - }} - /> - + +
+ +
+ +
+ { + store.setVegaWalletConnectDialog(open); + }} + setManageDialog={(open) => { + store.setVegaWalletManageDialog(open); + }} + /> + +
-
-
- {/* @ts-ignore conflict between @types/react and nextjs internal types */} - -
- store.setVegaWalletConnectDialog(open)} - /> - store.setVegaWalletManageDialog(open)} - /> - store.setVegaNetworkSwitcherDialog(open)} - onConnect={({ network }) => { - if (VEGA_NETWORKS[network]) { - push(VEGA_NETWORKS[network] ?? ''); - } - }} - /> - -
+
+ {/* @ts-ignore conflict between @types/react and nextjs internal types */} + +
+ store.setVegaWalletConnectDialog(open)} + /> + store.setVegaWalletManageDialog(open)} + /> + store.setVegaNetworkSwitcherDialog(open)} + onConnect={({ network }) => { + if (VEGA_NETWORKS[network]) { + push(VEGA_NETWORKS[network] ?? ''); + } + }} + /> + +
+ ); } function VegaTradingApp(props: AppProps) { - const [theme] = useThemeSwitcher(); - return ( - - - - - {t('Welcome to Vega trading!')} - - - {['1', 'true'].includes( - process.env['NX_USE_ENV_OVERRIDES'] || '' - ) ? ( - /* eslint-disable-next-line @next/next/no-sync-scripts */ -