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/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() { > - - - + + + - - + + = () => { const { t } = useTranslation(); - const router = useRouter(); const walletAddress = useRecoilValue(walletAddressState); @@ -31,12 +29,6 @@ const LoansPage: FC = () => { const { selectedPriceCurrency, getPriceAtCurrentRate } = useSelectedPriceCurrency(); const { stakingAPR } = useUserStakingData(walletAddress); - useEffect(() => { - if (router.asPath === '/loans') { - router.push('/loans/new'); - } - }, [router, router.asPath, router.push]); - return ( <> 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..149cb4073 --- /dev/null +++ b/no-next/App.tsx @@ -0,0 +1,129 @@ +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 { 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 Routes from './Routes'; + +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 */} +