This repository was archived by the owner on Sep 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
POC Remove NEXT #1178
Draft
noisekit
wants to merge
3
commits into
dev
Choose a base branch
from
no-next
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
POC Remove NEXT #1178
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,7 @@ tests/e2e/videos | |
|
|
||
| coverage | ||
| tsconfig.tsbuildinfo | ||
|
|
||
| dist | ||
|
|
||
| .yarn/* | ||
| !.yarn/patches | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta content="initial-scale=1, width=device-width" name="viewport" /> | ||
| <meta content="ie=edge" http-equiv="X-UA-Compatible" /> | ||
| <link href="./public/images/favicon.ico" rel="icon" /> | ||
| <title>No NEXT</title> | ||
| </head> | ||
| <body> | ||
| <div id="app"></div> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // @ts-nocheck | ||
|
|
||
| import { bootstrap } from './no-next/bootstrap'; | ||
|
|
||
| bootstrap(); | ||
|
|
||
| if (module.hot) { | ||
| module.hot.accept(); | ||
| module.hot.dispose(() => { | ||
| // do nothing | ||
| }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 ( | ||
| <> | ||
| <SynthetixQueryContextProvider | ||
| value={ | ||
| provider && network?.id | ||
| ? createQueryContext({ | ||
| provider: provider, | ||
| signer: signer || undefined, | ||
| networkId: network.id, | ||
| }) | ||
| : createQueryContext({ | ||
| networkId: 1, | ||
| provider: L1DefaultProvider, | ||
| }) | ||
| } | ||
| > | ||
| <Layout> | ||
| <SystemStatus> | ||
| <AppLayout> | ||
| <DashboardPage /> | ||
| </AppLayout> | ||
| </SystemStatus> | ||
| </Layout> | ||
| <ReactQueryDevtools /> | ||
| </SynthetixQueryContextProvider> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| function App() { | ||
| const { t } = useTranslation(); | ||
|
|
||
| return ( | ||
| <> | ||
| <Head> | ||
| <meta charSet="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta name="description" content={t('meta.description')} /> | ||
| {/* open graph */} | ||
| <meta property="og:url" content="https://staking.synthetix.io/" /> | ||
| <meta property="og:type" content="website" /> | ||
| <meta property="og:title" content={t('meta.og.title')} /> | ||
| <meta property="og:description" content={t('meta.description')} /> | ||
| <meta property="og:image" content="/images/staking-facebook.jpg" /> | ||
| <meta property="og:image:alt" content={t('meta.og.title')} /> | ||
| <meta property="og:site_name" content={t('meta.og.site-name')} /> | ||
| {/* twitter */} | ||
| <meta name="twitter:card" content="summary_large_image" /> | ||
| <meta name="twitter:site" content="@synthetix_io" /> | ||
| <meta name="twitter:creator" content="@synthetix_io" /> | ||
| <meta name="twitter:image" content="/images/staking-twitter.jpg" /> | ||
| <meta name="twitter:url" content="https://staking.synthetix.io" /> | ||
| <link rel="icon" href="/images/favicon.ico" /> | ||
|
|
||
| {/* matomo */} | ||
| <script | ||
| dangerouslySetInnerHTML={{ | ||
| __html: ` | ||
| var _paq = window._paq = window._paq || []; | ||
| /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | ||
| _paq.push(['trackPageView']); | ||
| _paq.push(['enableLinkTracking']); | ||
| (function() { | ||
| var u="https://analytics.synthetix.io/"; | ||
| _paq.push(['setTrackerUrl', u+'matomo.php']); | ||
| _paq.push(['setSiteId', '3']); | ||
| var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | ||
| g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); | ||
| })(); | ||
| `, | ||
| }} | ||
| /> | ||
| </Head> | ||
| <ThemeProvider theme={theme}> | ||
| <RecoilRoot> | ||
| <QueryClientProvider client={queryClient} contextSharing={true}> | ||
| <WithAppContainers> | ||
| <MediaContextProvider> | ||
| <InnerApp /> | ||
| </MediaContextProvider> | ||
| </WithAppContainers> | ||
| </QueryClientProvider> | ||
| </RecoilRoot> | ||
| </ThemeProvider> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| export default App; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| * { | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; | ||
| -webkit-font-smoothing: antialiased; | ||
| -moz-osx-font-smoothing: grayscale; | ||
| text-rendering: optimizeSpeed; | ||
| margin: 0; | ||
| min-height: 100vh; | ||
| position: relative; | ||
| scroll-behavior: smooth; | ||
| padding-bottom: 50px; | ||
| } | ||
|
|
||
| ul { | ||
| list-style: none; | ||
| padding: 0; | ||
| margin: 0; | ||
| } | ||
|
|
||
| input[type='number'] { | ||
| -moz-appearance: textfield; | ||
| } | ||
|
|
||
| input::-webkit-outer-spin-button, | ||
| input::-webkit-inner-spin-button { | ||
| -webkit-appearance: none; | ||
| } | ||
|
|
||
| /* Inter */ | ||
|
|
||
| @font-face { | ||
| font-family: 'Inter'; | ||
| font-style: normal; | ||
| font-weight: 400; | ||
| font-display: swap; | ||
| src: local('Inter'), url('../public/fonts/Inter-Regular.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'Inter Semi Bold'; | ||
| font-style: normal; | ||
| font-weight: 600; | ||
| font-display: swap; | ||
| src: local('Inter Semi Bold'), url('../public/fonts/Inter-SemiBold.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'Inter Bold'; | ||
| font-style: normal; | ||
| font-weight: 700; | ||
| font-display: swap; | ||
| src: local('Inter Bold'), url('../public/fonts/Inter-Bold.woff2') format('woff2'); | ||
| } | ||
|
|
||
| /* GT America */ | ||
|
|
||
| @font-face { | ||
| font-family: 'GT America Mono'; | ||
| font-style: normal; | ||
| font-display: swap; | ||
| font-weight: 700; | ||
| src: local('GT America Mono'), url('../public/fonts/GT-America-Mono-Bold.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'GT America Condensed-Medium'; | ||
| font-style: normal; | ||
| font-display: swap; | ||
| font-weight: 500; | ||
| src: local('GT America Condensed-Medium'), | ||
| url('../public/fonts/GT-America-Condensed-Medium.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'GT America Condensed-Bold'; | ||
| font-display: swap; | ||
| font-style: normal; | ||
| font-weight: 700; | ||
| font-stretch: condensed; | ||
| src: local('GT America Condensed-Bold'), | ||
| url('../public/fonts/GT-America-Condensed-Bold.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'GT America Extended Bold'; | ||
| font-style: normal; | ||
| font-display: swap; | ||
| font-weight: 700; | ||
| src: local('GT America Extended Bold'), | ||
| url('../public/fonts/GT-America-Extended-Bold.woff2') format('woff2'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import * as React from 'react'; | ||
| import { Suspense } from 'react'; | ||
| import ReactDOM from 'react-dom'; | ||
| import { safeLazy } from '@synthetixio/safe-import'; | ||
| import GlobalLoader from 'components/GlobalLoader'; | ||
|
|
||
| import '@reach/dialog/styles.css'; | ||
| import 'tippy.js/dist/tippy.css'; | ||
| import './app.css'; | ||
|
|
||
| const App = safeLazy(() => import(/* webpackChunkName: "app" */ './App')); | ||
|
|
||
| export async function bootstrap() { | ||
| ReactDOM.render( | ||
| <React.StrictMode> | ||
| <Suspense fallback={<GlobalLoader />}> | ||
| <App /> | ||
| </Suspense> | ||
| </React.StrictMode>, | ||
| document.querySelector('#app') | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export default function Link({ ...props }) { | ||
| // eslint-disable-next-line jsx-a11y/anchor-has-content | ||
| return <a {...props} />; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| const router = { | ||
| push: function push() {}, | ||
| asPath: '', | ||
| }; | ||
|
|
||
| export function useRouter() { | ||
| return router; | ||
| } | ||
|
|
||
| export default router; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / ESLint
Enforce all anchors to contain accessible content.