From 651b09a3af1e84f0578f815a23187b75d318943f Mon Sep 17 00:00:00 2001 From: Nikita Date: Thu, 14 Jul 2022 13:19:02 +0800 Subject: [PATCH 1/3] FIX: using incorrect JSX property names in SVG --- components/GlobalLoader/GlobalLoader.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/GlobalLoader/GlobalLoader.tsx b/components/GlobalLoader/GlobalLoader.tsx index 996602689..3c8a7f59b 100644 --- a/components/GlobalLoader/GlobalLoader.tsx +++ b/components/GlobalLoader/GlobalLoader.tsx @@ -18,13 +18,13 @@ export function GlobalLoader() { > - - - + + + - - + + Date: Thu, 14 Jul 2022 13:19:13 +0800 Subject: [PATCH 2/3] WIP: Dashboard page de-nexted --- .gitignore | 2 +- index.html | 13 + index.ts | 12 + no-next/App.tsx | 132 +++ no-next/app.css | 94 ++ no-next/bootstrap.tsx | 22 + no-next/next-link.tsx | 4 + no-next/next-router.ts | 10 + package.json | 14 +- typings/missing-types.d.ts | 1 + webpack.config.js | 156 ++++ yarn.lock | 1788 ++++++++++++++++++++++++++++++++++-- 12 files changed, 2184 insertions(+), 64 deletions(-) create mode 100644 index.html create mode 100644 index.ts create mode 100644 no-next/App.tsx create mode 100644 no-next/app.css create mode 100644 no-next/bootstrap.tsx create mode 100644 no-next/next-link.tsx create mode 100644 no-next/next-router.ts create mode 100644 webpack.config.js diff --git a/.gitignore b/.gitignore index df1901d8e..9fd912671 100644 --- a/.gitignore +++ b/.gitignore @@ -44,7 +44,7 @@ tests/e2e/videos coverage tsconfig.tsbuildinfo - +dist .yarn/* !.yarn/patches diff --git a/index.html b/index.html new file mode 100644 index 000000000..22c5e55b4 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + + No NEXT + + +
+ + diff --git a/index.ts b/index.ts new file mode 100644 index 000000000..48cee76d5 --- /dev/null +++ b/index.ts @@ -0,0 +1,12 @@ +// @ts-nocheck + +import { bootstrap } from './no-next/bootstrap'; + +bootstrap(); + +if (module.hot) { + module.hot.accept(); + module.hot.dispose(() => { + // do nothing + }); +} diff --git a/no-next/App.tsx b/no-next/App.tsx new file mode 100644 index 000000000..a4befb8ee --- /dev/null +++ b/no-next/App.tsx @@ -0,0 +1,132 @@ +import React from 'react'; +import { useEffect } from 'react'; +import Head from 'next/head'; +import { RecoilRoot } from 'recoil'; +import { useTranslation } from 'react-i18next'; +import { ThemeProvider } from 'styled-components'; + +import WithAppContainers from 'containers'; +import theme from 'styles/theme'; +import Layout from 'sections/shared/Layout'; +import AppLayout from 'sections/shared/Layout/AppLayout'; +import { MediaContextProvider } from 'styles/media'; +import { QueryClient, QueryClientProvider } from 'react-query'; +import { ReactQueryDevtools } from 'react-query/devtools'; +import { DEFAULT_REQUEST_REFRESH_INTERVAL } from 'constants/defaults'; + +import { SynthetixQueryContextProvider, createQueryContext } from '@synthetixio/queries'; + +import SystemStatus from 'sections/shared/SystemStatus'; + +import '../i18n'; +import Connector from 'containers/Connector'; + +import DashboardPage from 'content/DashboardPage'; + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + refetchInterval: DEFAULT_REQUEST_REFRESH_INTERVAL, + refetchOnWindowFocus: false, + }, + }, +}); + +function InnerApp() { + const { provider, signer, network, L1DefaultProvider } = Connector.useContainer(); + + useEffect(() => { + try { + document.querySelector('#global-loader')?.remove(); + } catch (_e) {} + }, []); + + return ( + <> + + + + + + + + + + + + ); +} + +function App() { + const { t } = useTranslation(); + + return ( + <> + + + + + {/* open graph */} + + + + + + + + {/* twitter */} + + + + + + + + {/* matomo */} +