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
14b70eeb
Commit
14b70eeb
authored
Oct 27, 2018
by
Chi Kei Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix routes for assets path
parent
6b5621fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
17 deletions
+13
-17
index.js
src/components/NavigationTabs/index.js
+6
-10
App.js
src/pages/App.js
+2
-1
ModeSelector.js
src/pages/Pool/ModeSelector.js
+3
-3
index.js
src/pages/Pool/index.js
+2
-3
No files found.
src/components/NavigationTabs/index.js
View file @
14b70eeb
...
@@ -19,17 +19,13 @@ class NavigationTabs extends Component {
...
@@ -19,17 +19,13 @@ class NavigationTabs extends Component {
};
};
}
}
renderTab
(
name
,
path
)
{
renderTab
(
name
,
path
,
regex
)
{
const
{
push
}
=
this
.
props
.
history
;
const
{
push
}
=
this
.
props
.
history
;
const
{
selectedPath
}
=
this
.
state
;
return
(
return
(
<
Tab
<
Tab
text
=
{
name
}
text
=
{
name
}
onClick
=
{()
=>
{
onClick
=
{()
=>
push
(
path
)}
push
(
path
);
isSelected
=
{
regex
.
test
(
this
.
props
.
location
.
pathname
)}
this
.
setState
({
selectedPath
:
path
});
}}
isSelected
=
{
selectedPath
.
indexOf
(
path
)
>
-
1
}
/
>
/
>
)
)
}
}
...
@@ -37,9 +33,9 @@ class NavigationTabs extends Component {
...
@@ -37,9 +33,9 @@ class NavigationTabs extends Component {
render
()
{
render
()
{
return
(
return
(
<
Tabs
className
=
{
this
.
props
.
className
}
>
<
Tabs
className
=
{
this
.
props
.
className
}
>
{
this
.
renderTab
(
'
Swap
'
,
'
/swap
'
)
}
{
this
.
renderTab
(
'
Swap
'
,
'
/swap
'
,
/swap/
)
}
{
this
.
renderTab
(
'
Send
'
,
'
/send
'
)
}
{
this
.
renderTab
(
'
Send
'
,
'
/send
'
,
/send/
)
}
{
this
.
renderTab
(
'
Pool
'
,
'
/
pool
'
)
}
{
this
.
renderTab
(
'
Pool
'
,
'
/
add-liquidity
'
,
/add-liquidity|remove-liquidity|create-exchange/
)
}
<
/Tabs
>
<
/Tabs
>
);
);
}
}
...
...
src/pages/App.js
View file @
14b70eeb
...
@@ -53,7 +53,8 @@ class App extends Component {
...
@@ -53,7 +53,8 @@ class App extends Component {
>
>
<
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
path
=
"
/pool
"
component
=
{
Pool
}
/
>
<
Route
exact
path
=
"
/add-liquidity
"
component
=
{
Pool
}
/
>
<
Route
exact
path
=
"
/create-exchange
"
component
=
{
Pool
}
/
>
<
Redirect
exact
from
=
"
/
"
to
=
"
/swap
"
/>
<
Redirect
exact
from
=
"
/
"
to
=
"
/swap
"
/>
<
/AnimatedSwitch
>
<
/AnimatedSwitch
>
<
/BrowserRouter
>
<
/BrowserRouter
>
...
...
src/pages/Pool/ModeSelector.js
View file @
14b70eeb
...
@@ -25,11 +25,11 @@ class ModeSelector extends Component {
...
@@ -25,11 +25,11 @@ class ModeSelector extends Component {
switch
(
view
)
{
switch
(
view
)
{
case
ADD
:
case
ADD
:
return
history
.
push
(
'
/
pool/add
'
);
return
history
.
push
(
'
/
add-liquidity
'
);
case
REMOVE
:
case
REMOVE
:
return
history
.
push
(
'
/
pool/remove
'
);
return
history
.
push
(
'
/
remove-liquidity
'
);
case
CREATE
:
case
CREATE
:
return
history
.
push
(
'
/
pool/creat
e
'
);
return
history
.
push
(
'
/
create-exchang
e
'
);
default
:
default
:
return
;
return
;
}
}
...
...
src/pages/Pool/index.js
View file @
14b70eeb
...
@@ -15,10 +15,9 @@ class Pool extends Component {
...
@@ -15,10 +15,9 @@ class Pool extends Component {
<
Header
/>
<
Header
/>
<
/MediaQuery
>
<
/MediaQuery
>
<
Switch
>
<
Switch
>
<
Route
exact
path
=
"
/
pool/add
"
component
=
{
AddLiquidity
}
/
>
<
Route
exact
path
=
"
/
add-liquidity
"
component
=
{
AddLiquidity
}
/
>
{
/*<Route exact path="/remove" component={Send} />*/
}
{
/*<Route exact path="/remove" component={Send} />*/
}
<
Route
exact
path
=
"
/pool/create
"
component
=
{
CreateExchange
}
/
>
<
Route
exact
path
=
"
/create-exchange
"
component
=
{
CreateExchange
}
/
>
<
Redirect
exact
from
=
"
/pool
"
to
=
"
/pool/add
"
/>
<
/Switch
>
<
/Switch
>
<
/div
>
<
/div
>
);
);
...
...
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