From 374faa0b74133b967638af875700d03c60e2466f Mon Sep 17 00:00:00 2001 From: Sam Keen Date: Fri, 17 Jun 2022 18:26:45 +0100 Subject: [PATCH] fix(#586): theme switcher not working for all panels --- apps/trading/pages/_app.page.tsx | 76 ++++++++++++++++---------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/apps/trading/pages/_app.page.tsx b/apps/trading/pages/_app.page.tsx index 63d27a343..45d4a20af 100644 --- a/apps/trading/pages/_app.page.tsx +++ b/apps/trading/pages/_app.page.tsx @@ -25,47 +25,49 @@ function AppBody({ Component, pageProps }: AppProps) { const store = useGlobalStore(); const { VEGA_NETWORKS } = useEnvironment(); // eslint-disable-next-line @typescript-eslint/no-unused-vars - 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]) { + window.location.href = 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]) { - window.location.href = VEGA_NETWORKS[network]; - } - }} - /> -
+ ); }