Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
8847f4e4
Commit
8847f4e4
authored
Oct 06, 2018
by
Chi Kei Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Pool screen
parent
b9665b3a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
129 additions
and
3 deletions
+129
-3
App.js
src/pages/App.js
+2
-2
index.js
src/pages/Pool/index.js
+81
-0
pool.scss
src/pages/Pool/pool.scss
+45
-0
swap.scss
src/pages/Swap/swap.scss
+1
-1
No files found.
src/pages/App.js
View file @
8847f4e4
...
...
@@ -10,9 +10,9 @@ import { BrowserRouter, Switch, Route } from 'react-router-dom';
// import About from '../components/About';
// import Links from '../components/Links';
// import SharePurchase from '../components/SharePurchase';
import
Swap
from
'
./Swap
'
;
import
Send
from
'
./Send
'
;
import
Pool
from
'
./Pool
'
;
import
'
./App.scss
'
;
...
...
@@ -68,7 +68,7 @@ class App extends Component {
<
Switch
>
<
Route
exact
path
=
"
/swap
"
component
=
{
Swap
}
/
>
<
Route
exact
path
=
"
/send
"
component
=
{
Send
}
/
>
<
Route
exact
path
=
"
/pool
"
component
=
{
Swap
}
/
>
<
Route
exact
path
=
"
/pool
"
component
=
{
Pool
}
/
>
<
/Switch
>
<
/BrowserRouter
>
)
...
...
src/pages/Pool/index.js
0 → 100644
View file @
8847f4e4
import
React
,
{
Component
}
from
'
react
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
withRouter
}
from
'
react-router-dom
'
;
import
PropTypes
from
'
prop-types
'
;
import
Header
from
'
../../components/Header
'
;
import
NavigationTabs
from
'
../../components/NavigationTabs
'
;
import
CurrencyInputPanel
from
'
../../components/CurrencyInputPanel
'
;
import
OversizedPanel
from
'
../../components/OversizedPanel
'
;
import
ArrowDown
from
'
../../assets/images/arrow-down-blue.svg
'
;
import
Dropdown
from
'
../../assets/images/dropdown.svg
'
;
import
"
./pool.scss
"
;
function
b
(
text
)
{
return
<
span
className
=
"
swap__highlight-text
"
>
{
text
}
<
/span
>
}
class
Pool
extends
Component
{
static
propTypes
=
{
// Injected by React Router Dom
push
:
PropTypes
.
func
.
isRequired
,
pathname
:
PropTypes
.
string
.
isRequired
,
};
render
()
{
return
(
<
div
className
=
"
pool
"
>
<
Header
/>
<
NavigationTabs
className
=
"
swap__navigation
"
/>
<
div
className
=
"
swap__content
"
>
<
OversizedPanel
hideTop
>
<
div
className
=
"
pool__liquidity-container
"
>
<
span
className
=
"
pool__liquidity-label
"
>
Add
Liquidity
<
/span
>
<
img
src
=
{
Dropdown
}
/
>
<
/div
>
<
/OversizedPanel
>
<
CurrencyInputPanel
title
=
"
Input
"
extraText
=
"
Balance: 0.03141
"
/>
<
OversizedPanel
>
<
div
className
=
"
swap__down-arrow-background
"
>
<
img
className
=
"
swap__down-arrow
"
src
=
{
ArrowDown
}
/
>
<
/div
>
<
/OversizedPanel
>
<
CurrencyInputPanel
title
=
"
Output
"
description
=
"
(estimated)
"
extraText
=
"
Balance: 0.0
"
/>
<
OversizedPanel
hideBottom
>
<
div
className
=
"
pool__summary-panel
"
>
<
div
className
=
"
pool__exchange-rate-wrapper
"
>
<
span
className
=
"
pool__exchange-rate
"
>
Exchange
Rate
<
/span
>
<
span
>
1
ETH
=
1283.878
BAT
<
/span
>
<
/div
>
<
div
className
=
"
pool__exchange-rate-wrapper
"
>
<
span
className
=
"
swap__exchange-rate
"
>
Current
Pool
Size
<
/span
>
<
span
>
321
ETH
/
321
,
000
BAT
<
/span
>
<
/div
>
<
/div
>
<
/OversizedPanel
>
<
div
className
=
"
swap__summary-wrapper
"
>
<
div
>
You
are
adding
between
{
b
`212000.00 - 216000.00 BAT`
}
+
{
b
`166.683543 ETH`
}
into
the
liquidity
pool
.
<
/div
>
<
div
className
=
"
pool__last-summary-text
"
>
You
will
receive
between
{
b
`66%`
}
and
{
b
`67%`
}
of
the
BAT
/
ETH
pool
tokens
.
<
/div
>
<
/div
>
<
/div
>
<
button
className
=
"
swap__cta-btn
"
>
Add
Liquidity
<
/button
>
<
/div
>
);
}
}
export
default
withRouter
(
connect
(
(
state
,
ownProps
)
=>
({
push
:
ownProps
.
history
.
push
,
pathname
:
ownProps
.
location
.
pathname
,
}),
)(
Pool
)
);
src/pages/Pool/pool.scss
0 → 100644
View file @
8847f4e4
@import
"../../variables.scss"
;
.pool
{
@extend
%col-nowrap
;
height
:
100%
;
&
__liquidity-container
{
@extend
%row-nowrap
;
align-items
:
center
;
padding
:
1rem
;
font-size
:
.75rem
;
img
{
height
:
.75rem
;
width
:
.75rem
;
}
}
&
__liquidity-label
{
flex
:
1
0
auto
;
}
&
__summary-panel
{
@extend
%col-nowrap
;
padding
:
1rem
0
;
}
&
__last-summary-text
{
margin-top
:
1rem
;
}
&
__exchange-rate-wrapper
{
@extend
%row-nowrap
;
align-items
:
center
;
color
:
$dove-gray
;
font-size
:
.75rem
;
padding
:
.25rem
1rem
0
;
}
&
__exchange-rate
{
flex
:
1
1
auto
;
width
:
0
;
color
:
$chalice-gray
;
}
}
src/pages/Swap/swap.scss
View file @
8847f4e4
...
...
@@ -45,7 +45,7 @@
}
&
__summary-wrapper
{
margin
-top
:
2rem
;
margin
:
2rem
1rem
0
;
color
:
#737373
;
font-size
:
.75rem
;
text-align
:
center
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment