1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/src/pages/_app.tsx

38 lines
1.2 KiB
TypeScript
Raw Normal View History

// import App from "next/app";
2020-07-01 18:57:10 +02:00
import React, { ReactElement } from 'react'
import type { AppProps /*, AppContext */ } from 'next/app'
2021-10-18 20:44:33 +02:00
import Web3Provider from '@context/Web3'
import { UserPreferencesProvider } from '@context/UserPreferences'
import PricesProvider from '@context/Prices'
import UrqlProvider from '@context/UrqlProvider'
import ConsentProvider from '@context/CookieConsent'
import App from 'src/components/App'
2020-07-01 18:57:10 +02:00
import '@oceanprotocol/typographies/css/ocean-typo.css'
import '../stylesGlobal/styles.css'
Various fixes in the pool component (#1327) * remove legacy check to prevent rug pull Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * various fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove old prop Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove old prop Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * add expected output to remove Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove console.logs Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix max calculations Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactors Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * temp fixes for build Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * local calc for pice and liquidity Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove var Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix profile liquidity Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * global context, opc fee Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * comment Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * various fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactor global context Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove nesting from market context Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix build Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix undefined appConfig Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * direct import of appConfig & siteContent * this never changes on run time, so we should never have to wait for it and have it in js bundle at all times * in utility methods, import directly * for components, import directly in MarketMetadata context and pass through * remove screen CSS fixes * put back auto-fetching indicator, move manual refresh action behind debug Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-04-22 02:38:35 +02:00
import Decimal from 'decimal.js'
import MarketMetadataProvider from '@context/MarketMetadata'
function MyApp({ Component, pageProps }: AppProps): ReactElement {
Various fixes in the pool component (#1327) * remove legacy check to prevent rug pull Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * various fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove old prop Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove old prop Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * add expected output to remove Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove console.logs Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix max calculations Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactors Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * temp fixes for build Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * local calc for pice and liquidity Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove var Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix profile liquidity Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * global context, opc fee Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * comment Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * various fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactor global context Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove nesting from market context Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix build Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix undefined appConfig Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * direct import of appConfig & siteContent * this never changes on run time, so we should never have to wait for it and have it in js bundle at all times * in utility methods, import directly * for components, import directly in MarketMetadata context and pass through * remove screen CSS fixes * put back auto-fetching indicator, move manual refresh action behind debug Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-04-22 02:38:35 +02:00
Decimal.set({ rounding: 1 })
2020-08-07 10:17:06 +02:00
return (
Unsupported Network Tooltip (#1331) * Moving isSupportedOceanNetwork to Web3 context * Removing page title and replacing it with a warning message * Creating Error state in title for the wrong network * Creating UnsupportedNetwrok component * Adding different networks into tooltip * Adding button + styling * Adding change netwrok function * Adding Change Network tooltip to submit page * Reducing code duplication * Removing unnecessary changes * Fixing logic for checking which chainIds are supported * Simplifying isSupportedOceanNetwork check logic * Default to not showing unsupported network message when no wallet is connected * Always showing available networks in tooltip * Adding info icon to action button * adding padding to AvailableNetworks component * Changing label to list components * Changing brand-white to currentColor * Revert "Changing brand-white to currentColor" This reverts commit 278f0d4ab9e38f23985b2f29f7ff11625a7d14d7. * CHanging --brand-white to currentColor * Info Icon in currentColor * Changing NetworkOptions component name to Network * Simplifying tooltip logic in title * Removing unused classname * Fixing repeating <ul> issue * Removing unused class * Refactoring AvailableNetworks component into src/components/Publish * Moving tooltip message into content/publish/index.json * Reducing duplication in css * Removing duplication of infoIcon css styles * Tidying up logic in setIsSupportedOceanNetwork useEffect * Updating setIsSupportedOceanNetwork effect dependancies * merge fixes for new MarketMetadata context Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-04-22 02:54:04 +02:00
<MarketMetadataProvider>
<Web3Provider>
<UrqlProvider>
Various fixes in the pool component (#1327) * remove legacy check to prevent rug pull Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * various fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove old prop Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove old prop Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * add expected output to remove Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove console.logs Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix max calculations Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactors Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * temp fixes for build Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * local calc for pice and liquidity Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove var Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix profile liquidity Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * global context, opc fee Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * comment Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * various fixes Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * refactor global context Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * remove nesting from market context Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix build Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * fix undefined appConfig Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * direct import of appConfig & siteContent * this never changes on run time, so we should never have to wait for it and have it in js bundle at all times * in utility methods, import directly * for components, import directly in MarketMetadata context and pass through * remove screen CSS fixes * put back auto-fetching indicator, move manual refresh action behind debug Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-04-22 02:38:35 +02:00
<UserPreferencesProvider>
<PricesProvider>
<ConsentProvider>
<App>
<Component {...pageProps} />
</App>
</ConsentProvider>
</PricesProvider>
</UserPreferencesProvider>
Unsupported Network Tooltip (#1331) * Moving isSupportedOceanNetwork to Web3 context * Removing page title and replacing it with a warning message * Creating Error state in title for the wrong network * Creating UnsupportedNetwrok component * Adding different networks into tooltip * Adding button + styling * Adding change netwrok function * Adding Change Network tooltip to submit page * Reducing code duplication * Removing unnecessary changes * Fixing logic for checking which chainIds are supported * Simplifying isSupportedOceanNetwork check logic * Default to not showing unsupported network message when no wallet is connected * Always showing available networks in tooltip * Adding info icon to action button * adding padding to AvailableNetworks component * Changing label to list components * Changing brand-white to currentColor * Revert "Changing brand-white to currentColor" This reverts commit 278f0d4ab9e38f23985b2f29f7ff11625a7d14d7. * CHanging --brand-white to currentColor * Info Icon in currentColor * Changing NetworkOptions component name to Network * Simplifying tooltip logic in title * Removing unused classname * Fixing repeating <ul> issue * Removing unused class * Refactoring AvailableNetworks component into src/components/Publish * Moving tooltip message into content/publish/index.json * Reducing duplication in css * Removing duplication of infoIcon css styles * Tidying up logic in setIsSupportedOceanNetwork useEffect * Updating setIsSupportedOceanNetwork effect dependancies * merge fixes for new MarketMetadata context Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
2022-04-22 02:54:04 +02:00
</UrqlProvider>
</Web3Provider>
</MarketMetadataProvider>
2020-08-07 10:17:06 +02:00
)
}
export default MyApp