Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Send/Send.js
import React, { useState, useEffect } from 'react'; | import React, { useState, useEffect } from 'react'; | ||||
import styled from 'styled-components'; | import styled from 'styled-components'; | ||||
import { WalletContext } from '../../utils/context'; | import { WalletContext } from '../../utils/context'; | ||||
import { Form, notification, message } from 'antd'; | import { Form, notification, message, Spin } from 'antd'; | ||||
import { CashLoader } from '../Common/CustomIcons'; | import { CashLoader, CashLoadingIcon } from '../Common/CustomIcons'; | ||||
import { CashSpin, CashSpinIcon } from '../Common/CustomSpinner'; | |||||
import { Row, Col } from 'antd'; | import { Row, Col } from 'antd'; | ||||
import Paragraph from 'antd/lib/typography/Paragraph'; | import Paragraph from 'antd/lib/typography/Paragraph'; | ||||
import PrimaryButton, { SecondaryButton } from '../Common/PrimaryButton'; | import PrimaryButton, { SecondaryButton } from '../Common/PrimaryButton'; | ||||
import { | import { | ||||
SendBchInput, | SendBchInput, | ||||
FormItemWithQRCodeAddon, | FormItemWithQRCodeAddon, | ||||
} from '../Common/EnhancedInputs'; | } from '../Common/EnhancedInputs'; | ||||
import useBCH from '../../hooks/useBCH'; | import useBCH from '../../hooks/useBCH'; | ||||
▲ Show 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | return ( | ||||
USD | USD | ||||
</BalanceHeaderFiat> | </BalanceHeaderFiat> | ||||
)} | )} | ||||
</> | </> | ||||
)} | )} | ||||
<Row type="flex"> | <Row type="flex"> | ||||
<Col span={24}> | <Col span={24}> | ||||
<CashSpin spinning={loading} indicator={CashSpinIcon}> | <Spin spinning={loading} indicator={CashLoadingIcon}> | ||||
<Form style={{ width: 'auto' }}> | <Form style={{ width: 'auto' }}> | ||||
<FormItemWithQRCodeAddon | <FormItemWithQRCodeAddon | ||||
loadWithCameraOpen={scannerSupported} | loadWithCameraOpen={scannerSupported} | ||||
disabled={Boolean(filledAddress)} | disabled={Boolean(filledAddress)} | ||||
validateStatus={ | validateStatus={ | ||||
!formData.dirty && !formData.address | !formData.dirty && !formData.address | ||||
? 'error' | ? 'error' | ||||
: '' | : '' | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | return ( | ||||
<b> | <b> | ||||
An error occured on our end. | An error occured on our end. | ||||
Reconnecting... | Reconnecting... | ||||
</b> | </b> | ||||
</p> | </p> | ||||
</> | </> | ||||
)} | )} | ||||
</Form> | </Form> | ||||
</CashSpin> | </Spin> | ||||
</Col> | </Col> | ||||
</Row> | </Row> | ||||
</> | </> | ||||
); | ); | ||||
}; | }; | ||||
export default SendBCH; | export default SendBCH; |