import Head from 'next/head' import { ThemeProvider } from 'next-themes' import '../node_modules/react-grid-layout/css/styles.css' import '../node_modules/react-resizable/css/styles.css' import 'intro.js/introjs.css' import '../styles/index.css' import useWallet from '../hooks/useWallet' import useHydrateStore from '../hooks/useHydrateStore' import Notifications from '../components/Notification' import useMangoStore from '../stores/useMangoStore' import useOraclePrice from '../hooks/useOraclePrice' import { getDecimalCount } from '../utils' import { useRouter } from 'next/router' import { ViewportProvider } from '../hooks/useViewport' import BottomBar from '../components/mobile/BottomBar' import { appWithTranslation } from 'next-i18next' import ErrorBoundary from '../components/ErrorBoundary' import GlobalNotification from '../components/GlobalNotification' const MangoStoreUpdater = () => { useHydrateStore() useWallet() return null } const PageTitle = () => { const router = useRouter() const marketConfig = useMangoStore((s) => s.selectedMarket.config) const market = useMangoStore((s) => s.selectedMarket.current) const oraclePrice = useOraclePrice() const selectedMarketName = marketConfig.name const marketTitleString = marketConfig && router.pathname.includes('market') ? `${ oraclePrice ? oraclePrice.toFixed(getDecimalCount(market?.tickSize)) + ' | ' : '' }${selectedMarketName} - ` : '' return ( {marketTitleString}Mango Markets ) } function App({ Component, pageProps }) { return ( <> Mango Markets
) } export default appWithTranslation(App)