Commit 7db3358d authored by Hayden Adams's avatar Hayden Adams Committed by GitHub

Merge pull request #229 from Uniswap/ha-dev

Ha dev
parents 44ef9445 5392c5e1
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { BrowserRouter, Redirect, Route } from 'react-router-dom'; import { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom';
import MediaQuery from 'react-responsive'; import MediaQuery from 'react-responsive';
import { AnimatedSwitch } from 'react-router-transition';
import { Web3Connect, startWatching, initialize } from '../ducks/web3connect'; import { Web3Connect, startWatching, initialize } from '../ducks/web3connect';
import { setAddresses } from '../ducks/addresses'; import { setAddresses } from '../ducks/addresses';
import Header from '../components/Header'; import Header from '../components/Header';
...@@ -45,19 +44,16 @@ class App extends Component { ...@@ -45,19 +44,16 @@ class App extends Component {
</MediaQuery> </MediaQuery>
<Web3Connect /> <Web3Connect />
<BrowserRouter> <BrowserRouter>
<AnimatedSwitch <Switch>
atEnter={{ opacity: 0 }} <div className="app__wrapper">
atLeave={{ opacity: 0 }}
atActive={{ opacity: 1 }}
className="app__switch-wrapper"
>
<Route exact path="/swap" component={Swap} /> <Route exact path="/swap" component={Swap} />
<Route exact path="/send" component={Send} /> <Route exact path="/send" component={Send} />
<Route exact path="/add-liquidity" component={Pool} /> <Route exact path="/add-liquidity" component={Pool} />
<Route exact path="/remove-liquidity" component={Pool} /> <Route exact path="/remove-liquidity" component={Pool} />
<Route exact path="/create-exchange/:tokenAddress?" component={Pool} /> <Route exact path="/create-exchange/:tokenAddress?" component={Pool} />
<Redirect exact from="/" to="/swap" /> <Redirect exact from="/" to="/swap" />
</AnimatedSwitch> </div>
</Switch>
</BrowserRouter> </BrowserRouter>
</div> </div>
); );
......
@import "../variables.scss"; @import "../variables.scss";
.app { .app {
&__switch-wrapper { &__wrapper {
height: 100%; height: 100%;
position: relative; position: relative;
margin: auto; margin: auto;
......
...@@ -518,6 +518,7 @@ class AddLiquidity extends Component { ...@@ -518,6 +518,7 @@ class AddLiquidity extends Component {
'header--inactive': !isConnected, 'header--inactive': !isConnected,
})} })}
/> />
{ {
this.isNewExchange() this.isNewExchange()
? ( ? (
......
...@@ -735,6 +735,7 @@ class Send extends Component { ...@@ -735,6 +735,7 @@ class Send extends Component {
'header--inactive': !this.props.isConnected, 'header--inactive': !this.props.isConnected,
})} })}
/> />
<CurrencyInputPanel <CurrencyInputPanel
title={t("input")} title={t("input")}
description={lastEditedField === OUTPUT ? estimatedText : ''} description={lastEditedField === OUTPUT ? estimatedText : ''}
......
...@@ -703,7 +703,6 @@ class Swap extends Component { ...@@ -703,7 +703,6 @@ class Swap extends Component {
const { inputError, outputError, isValid } = this.validate(); const { inputError, outputError, isValid } = this.validate();
return ( return (
<div className="swap"> <div className="swap">
<MediaQuery query="(max-width: 767px)"> <MediaQuery query="(max-width: 767px)">
...@@ -719,6 +718,7 @@ class Swap extends Component { ...@@ -719,6 +718,7 @@ class Swap extends Component {
'header--inactive': !this.props.isConnected, 'header--inactive': !this.props.isConnected,
})} })}
/> />
<CurrencyInputPanel <CurrencyInputPanel
title={t("input")} title={t("input")}
description={lastEditedField === OUTPUT ? estimatedText : ''} description={lastEditedField === OUTPUT ? estimatedText : ''}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment