Wallet swap disabled (#107)
* Disabled wallet swap tab. * Cleaned up UI since Swap is disabled.
This commit is contained in:
parent
1b43c54725
commit
17121b2066
1 changed files with 13 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as ICONS from 'constants/icons';
|
// import * as ICONS from 'constants/icons';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Page from 'component/page';
|
import Page from 'component/page';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
|
@ -15,8 +15,8 @@ import Nag from 'component/common/nag';
|
||||||
import I18nMessage from 'component/i18nMessage';
|
import I18nMessage from 'component/i18nMessage';
|
||||||
import LbcSymbol from 'component/common/lbc-symbol';
|
import LbcSymbol from 'component/common/lbc-symbol';
|
||||||
import { SIMPLE_SITE } from 'config';
|
import { SIMPLE_SITE } from 'config';
|
||||||
import classnames from 'classnames';
|
// import classnames from 'classnames';
|
||||||
import WalletSwap from 'component/walletSwap';
|
// import WalletSwap from 'component/walletSwap';
|
||||||
|
|
||||||
const MOONPAY_KEY = process.env.MOONPAY_SECRET_KEY;
|
const MOONPAY_KEY = process.env.MOONPAY_SECRET_KEY;
|
||||||
const COUNTRIES = Array.from(
|
const COUNTRIES = Array.from(
|
||||||
|
@ -38,10 +38,10 @@ const COUNTRIES = Array.from(
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const TAB = {
|
/* const TAB = {
|
||||||
BUY: 'BUY',
|
BUY: 'BUY',
|
||||||
SWAP: 'SWAP',
|
SWAP: 'SWAP',
|
||||||
};
|
}; */
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
receiveAddress: ?string,
|
receiveAddress: ?string,
|
||||||
|
@ -55,7 +55,7 @@ type Props = {
|
||||||
export default function BuyPage(props: Props) {
|
export default function BuyPage(props: Props) {
|
||||||
const { receiveAddress, gettingNewAddress, doGetNewAddress, email, user, doUserSetCountry } = props;
|
const { receiveAddress, gettingNewAddress, doGetNewAddress, email, user, doUserSetCountry } = props;
|
||||||
const initialCountry = (user && user.country) || '';
|
const initialCountry = (user && user.country) || '';
|
||||||
const [tab, setTab] = React.useState(TAB.BUY);
|
// const [tab, setTab] = React.useState(TAB.BUY);
|
||||||
const [url, setUrl] = React.useState();
|
const [url, setUrl] = React.useState();
|
||||||
const [country, setCountry] = React.useState(initialCountry);
|
const [country, setCountry] = React.useState(initialCountry);
|
||||||
const [showPurchaseScreen, setShowPurchaseScreen] = React.useState(false);
|
const [showPurchaseScreen, setShowPurchaseScreen] = React.useState(false);
|
||||||
|
@ -116,10 +116,10 @@ export default function BuyPage(props: Props) {
|
||||||
className="main--swap"
|
className="main--swap"
|
||||||
backout={{
|
backout={{
|
||||||
backoutLabel: __('Done'),
|
backoutLabel: __('Done'),
|
||||||
title: <LbcSymbol prefix={__('Buy or Swap')} size={28} />,
|
title: <LbcSymbol prefix={__('Buy') /* or Swap') */} size={28} />,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="section">
|
{/* <div className="section">
|
||||||
<Button
|
<Button
|
||||||
key="tip"
|
key="tip"
|
||||||
icon={ICONS.BUY}
|
icon={ICONS.BUY}
|
||||||
|
@ -136,11 +136,11 @@ export default function BuyPage(props: Props) {
|
||||||
onClick={() => setTab(TAB.SWAP)}
|
onClick={() => setTab(TAB.SWAP)}
|
||||||
className={classnames('button-toggle', { 'button-toggle--active': tab === TAB.SWAP })}
|
className={classnames('button-toggle', { 'button-toggle--active': tab === TAB.SWAP })}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div> */}
|
||||||
<div className="section">
|
<div className="section">
|
||||||
{tab === TAB.SWAP && <WalletSwap />}
|
{/* tab === TAB.SWAP && <WalletSwap /> */}
|
||||||
{tab === TAB.BUY && (
|
{
|
||||||
<>
|
/* tab === TAB.BUY && */ <>
|
||||||
{!user && (
|
{!user && (
|
||||||
<div className="main--empty">
|
<div className="main--empty">
|
||||||
<Spinner delayed />
|
<Spinner delayed />
|
||||||
|
@ -230,7 +230,7 @@ export default function BuyPage(props: Props) {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
}
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue