diff --git a/frontend/src/basic/Main.tsx b/frontend/src/basic/Main.tsx index 04e813a1d..7b74b653e 100644 --- a/frontend/src/basic/Main.tsx +++ b/frontend/src/basic/Main.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; import { HashRouter, BrowserRouter, Switch, Route, useHistory } from 'react-router-dom'; -import { useTheme, Box, Slide } from '@mui/material'; +import { useTheme, Box, Slide, Typography } from '@mui/material'; import UserGenPage from './UserGenPage'; import MakerPage from './MakerPage'; @@ -29,6 +29,7 @@ import { checkVer, getHost } from '../utils'; import { sha256 } from 'js-sha256'; import defaultCoordinators from '../../static/federation.json'; +import { useTranslation } from 'react-i18next'; const getWindowSize = function (fontSize: number) { // returns window size in EM units @@ -49,6 +50,8 @@ interface MainProps { } const Main = ({ settings, setSettings }: MainProps): JSX.Element => { + const { t } = useTranslation(); + // All app data structured const [book, setBook] = useState({ orders: [], loading: true }); const [limits, setLimits] = useState<{ list: LimitList; loading: boolean }>({ @@ -117,7 +120,6 @@ const Main = ({ settings, setSettings }: MainProps): JSX.Element => { : coordinators[0].testnetOnion; } setBaseUrl(`http://${host}`); - console.log(`http://${host}`); }, [settings.network]); useEffect(() => { @@ -225,6 +227,16 @@ const Main = ({ settings, setSettings }: MainProps): JSX.Element => { baseUrl={baseUrl} onLoad={() => setRobot({ ...robot, avatarLoaded: true })} /> + {settings.network === 'testnet' ? ( +
+ + {t('Using Testnet Bitcoin')} + +
+ ) : ( + <> + )} + { { const theme = useTheme(); const { t } = useTranslation(); @@ -100,6 +102,8 @@ const NavBar = ({ TabIndicatorProps={{ sx: { height: '0.3em', position: 'absolute', top: 0 } }} variant='fullWidth' value={page} + indicatorColor={color} + textColor={color} onChange={changePage} >