diff --git a/src/components/swaptab/index.js b/src/components/swaptab/index.js index ff63793..16bedec 100644 --- a/src/components/swaptab/index.js +++ b/src/components/swaptab/index.js @@ -8,6 +8,8 @@ import Controls from '../controls'; import Text, { InfoText } from '../text'; import { MIN, MAX } from '../../constants/fees'; +const boltz_logo = require('../../asset/icons/boltz_logo.png'); + const styles = theme => ({ wrapper: { margin: '15px', @@ -64,6 +66,21 @@ const styles = theme => ({ text: { fontSize: '20px', }, + loading: { + justifyContent: 'center', + alignItems: 'center', + height: '400px', + width: '600px', + backgroundColor: theme.colors.white, + '@media (min-width: 1500px)': { + width: '800px', + height: '600px', + }, + }, + loadingLogo: { + width: '200px', + height: '200px', + }, }); class SwapTab extends React.Component { @@ -128,7 +145,7 @@ class SwapTab extends React.Component { }; render() { - const { classes, rates, currencies } = this.props; + const { classes, rates, currencies, loading } = this.props; let { error, base, quote, baseAmount, quoteAmount } = this.state; if (quoteAmount === 0) { @@ -136,7 +153,17 @@ class SwapTab extends React.Component { quoteAmount = this.quoteAmount; } - return ( + return loading ? ( + + logo + + ) : ( @@ -187,6 +214,7 @@ SwapTab.propTypes = { onPress: PropTypes.func, rates: PropTypes.object.isRequired, currencies: PropTypes.array.isRequired, + loading: PropTypes.bool.isRequired, }; export default injectSheet(styles)(SwapTab); diff --git a/src/views/landingpage/landingpage.js b/src/views/landingpage/landingpage.js index 023be06..eea9955 100644 --- a/src/views/landingpage/landingpage.js +++ b/src/views/landingpage/landingpage.js @@ -72,6 +72,7 @@ class LandingPage extends React.Component { window.alert('WIP')} /> { const keys = generateKeys( state.base === 'BTC' ? bitcoinNetwork : litecoinNetwork