chore: fix warning from next js 12 upgrade

This commit is contained in:
tjs 2022-03-02 00:17:16 -05:00
parent 5dc40a2078
commit 80d876acc9
5 changed files with 51 additions and 27 deletions

View File

@ -44,7 +44,7 @@
"lodash": "^4.17.21",
"next": "^12.1.0",
"next-i18next": "^8.9.0",
"next-themes": "^0.0.14",
"next-themes": "^0.1.1",
"postcss-preset-env": "^7.2.0",
"rc-slider": "^9.7.5",
"react": "^17.0.2",

View File

@ -124,11 +124,6 @@ function App({ Component, pageProps }) {
<>
<Head>
<title>Mango Markets</title>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Lato:wght@200;300;400;500;600;700&display=swap"
rel="stylesheet"
/>
<link rel="icon" href="/favicon.ico" />
<meta property="og:title" content="Mango Markets" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
@ -158,9 +153,6 @@ function App({ Component, pageProps }) {
content="https://www.mango.markets/socials/twitter-image-1200x600.png?34567878"
/>
<meta name="google" content="notranslate" />
<script src="/datafeeds/udf/dist/polyfills.js"></script>
<script src="/datafeeds/udf/dist/bundle.js"></script>
<link rel="manifest" href="/manifest.json"></link>
</Head>
<ErrorBoundary>

22
pages/_document.jsx Normal file
View File

@ -0,0 +1,22 @@
import Document, { Html, Head, Main, NextScript } from 'next/document'
class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<link
href="https://fonts.googleapis.com/css2?family=Lato:wght@200;300;400;500;600;700&display=swap"
rel="stylesheet"
/>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
export default MyDocument

View File

@ -23,6 +23,7 @@ import {
} from '../stores/selectors'
import { PublicKey } from '@solana/web3.js'
import FavoritesShortcutBar from '../components/FavoritesShortcutBar'
import Script from 'next/script'
export async function getStaticProps({ locale }) {
return {
@ -131,19 +132,23 @@ const PerpMarket = () => {
}, [router, marketConfig])
return (
<div className={`bg-th-bkg-1 text-th-fgd-1 transition-all`}>
{showTour && !hideTips ? (
<IntroTips connected={connected} mangoAccount={mangoAccount} />
) : null}
<TopBar />
<FavoritesShortcutBar />
<PageBodyWrapper className="p-1 sm:px-2 sm:py-1 md:px-2 md:py-1 xl:px-4">
<TradePageGrid />
</PageBodyWrapper>
{!alphaAccepted && (
<AlphaModal isOpen={!alphaAccepted} onClose={() => {}} />
)}
</div>
<>
<Script src="/datafeeds/udf/dist/polyfills.js" strategy="lazyOnload" />
<Script src="/datafeeds/udf/dist/bundle.js" strategy="lazyOnload" />
<div className={`bg-th-bkg-1 text-th-fgd-1 transition-all`}>
{showTour && !hideTips ? (
<IntroTips connected={connected} mangoAccount={mangoAccount} />
) : null}
<TopBar />
<FavoritesShortcutBar />
<PageBodyWrapper className="p-1 sm:px-2 sm:py-1 md:px-2 md:py-1 xl:px-4">
<TradePageGrid />
</PageBodyWrapper>
{!alphaAccepted && (
<AlphaModal isOpen={!alphaAccepted} onClose={() => {}} />
)}
</div>
</>
)
}

View File

@ -5871,7 +5871,12 @@ murmurhash@^2.0.0:
resolved "https://registry.yarnpkg.com/murmurhash/-/murmurhash-2.0.0.tgz#556779daf7c39a0d2a3f5a9d080d84bf4833f9ee"
integrity sha512-Uo7ZHw+PLe2Q8/qbPIVYxAaoi+TYGZwu1a8ryeeASRXJLRSaLCblAGfjh02eu4+/9aUJBpkHXZv42AXmzOW2kw==
nanoid@^3.1.30, nanoid@^3.2.0:
nanoid@^3.1.30:
version "3.3.1"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35"
integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==
nanoid@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c"
integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==
@ -5899,10 +5904,10 @@ next-i18next@^8.9.0:
i18next-fs-backend "^1.0.7"
react-i18next "^11.8.13"
next-themes@^0.0.14:
version "0.0.14"
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.0.14.tgz#2b9861990bc453149e23d8e6ef1a25a119e36675"
integrity sha512-x09OaM+wg3SIlEjOv8B21aw/E36jxTtfW3Dm/DPwMsSMluGt7twe1LigA6nc+mXP1u0qu9MxBaIrPPH6UTiKnA==
next-themes@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.1.1.tgz#122113a458bf1d1be5ffed66778ab924c106f82a"
integrity sha512-Iqxt6rhS/KfK/iHJ0tfFjTcdLEAI0AgwFuAFrMwLOPK5e+MI3I+fzyvBoS+VaOS+NldUiazurhgwYhrfV0VXsQ==
next@^12.0.10:
version "12.0.10"