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
de6e3747
Unverified
Commit
de6e3747
authored
Jul 21, 2022
by
Sam Chen
Committed by
GitHub
Jul 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: remove unused SwapPoolTabs (#4159)
* chore: clean useless code * clean unused code
parent
475af631
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
48 deletions
+1
-48
index.tsx
src/components/NavigationTabs/index.tsx
+1
-43
index.tsx
src/pages/Pool/index.tsx
+0
-3
v2.tsx
src/pages/Pool/v2.tsx
+0
-2
No files found.
src/components/NavigationTabs/index.tsx
View file @
de6e3747
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
useTheme
from
'
hooks/useTheme
'
import
useTheme
from
'
hooks/useTheme
'
import
{
darken
}
from
'
polished
'
import
{
ReactNode
}
from
'
react
'
import
{
ReactNode
}
from
'
react
'
import
{
ArrowLeft
}
from
'
react-feather
'
import
{
ArrowLeft
}
from
'
react-feather
'
import
{
Link
as
HistoryLink
,
NavLink
,
useLocation
}
from
'
react-router-dom
'
import
{
Link
as
HistoryLink
,
useLocation
}
from
'
react-router-dom
'
import
{
Box
}
from
'
rebass
'
import
{
Box
}
from
'
rebass
'
import
{
useAppDispatch
}
from
'
state/hooks
'
import
{
useAppDispatch
}
from
'
state/hooks
'
import
{
resetMintState
}
from
'
state/mint/actions
'
import
{
resetMintState
}
from
'
state/mint/actions
'
...
@@ -22,34 +21,6 @@ const Tabs = styled.div`
...
@@ -22,34 +21,6 @@ const Tabs = styled.div`
justify-content: space-evenly;
justify-content: space-evenly;
`
`
const
activeClassName
=
'
ACTIVE
'
const
StyledNavLink
=
styled
(
NavLink
).
attrs
({
activeClassName
,
})
`
${({
theme
})
=>
theme
.
flexRowNoWrap
}
align-items: center;
justify-content: center;
height: 3rem;
border-radius: 3rem;
outline: none;
cursor: pointer;
text-decoration: none;
color:
${({
theme
})
=>
theme
.
deprecated_text3
}
;
font-size: 20px;
&.
${
activeClassName
}
{
border-radius: 12px;
font-weight: 500;
color:
${({
theme
})
=>
theme
.
deprecated_text1
}
;
}
:hover,
:focus {
color:
${({
theme
})
=>
darken
(
0.1
,
theme
.
deprecated_text1
)}
;
}
`
const
StyledHistoryLink
=
styled
(
HistoryLink
)
<
{
flex
:
string
|
undefined
}
>
`
const
StyledHistoryLink
=
styled
(
HistoryLink
)
<
{
flex
:
string
|
undefined
}
>
`
flex:
${({
flex
})
=>
flex
??
'
none
'
};
flex:
${({
flex
})
=>
flex
??
'
none
'
};
...
@@ -68,19 +39,6 @@ const StyledArrowLeft = styled(ArrowLeft)`
...
@@ -68,19 +39,6 @@ const StyledArrowLeft = styled(ArrowLeft)`
color
:
$
{({
theme
})
=>
theme
.
deprecated_text1
}
;
color
:
$
{({
theme
})
=>
theme
.
deprecated_text1
}
;
`
`
export
function
SwapPoolTabs
({
active
}:
{
active
:
'
swap
'
|
'
pool
'
})
{
return
(
<
Tabs
style=
{
{
marginBottom
:
'
20px
'
,
display
:
'
none
'
,
padding
:
'
1rem 1rem 0 1rem
'
}
}
>
<
StyledNavLink
id=
{
`swap-nav-link`
}
to=
{
'
/swap
'
}
isActive=
{
()
=>
active
===
'
swap
'
}
>
<
Trans
>
Swap
</
Trans
>
</
StyledNavLink
>
<
StyledNavLink
id=
{
`pool-nav-link`
}
to=
{
'
/pool
'
}
isActive=
{
()
=>
active
===
'
pool
'
}
>
<
Trans
>
Pool
</
Trans
>
</
StyledNavLink
>
</
Tabs
>
)
}
export
function
FindPoolTabs
({
origin
}:
{
origin
:
string
})
{
export
function
FindPoolTabs
({
origin
}:
{
origin
:
string
})
{
return
(
return
(
<
Tabs
>
<
Tabs
>
...
...
src/pages/Pool/index.tsx
View file @
de6e3747
...
@@ -7,7 +7,6 @@ import { TraceEvent } from 'components/AmplitudeAnalytics/TraceEvent'
...
@@ -7,7 +7,6 @@ import { TraceEvent } from 'components/AmplitudeAnalytics/TraceEvent'
import
{
ButtonGray
,
ButtonPrimary
,
ButtonText
}
from
'
components/Button
'
import
{
ButtonGray
,
ButtonPrimary
,
ButtonText
}
from
'
components/Button
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
AutoColumn
}
from
'
components/Column
'
import
{
FlyoutAlignment
,
NewMenu
}
from
'
components/Menu
'
import
{
FlyoutAlignment
,
NewMenu
}
from
'
components/Menu
'
import
{
SwapPoolTabs
}
from
'
components/NavigationTabs
'
import
PositionList
from
'
components/PositionList
'
import
PositionList
from
'
components/PositionList
'
import
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
{
RowBetween
,
RowFixed
}
from
'
components/Row
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
import
{
SwitchLocaleLink
}
from
'
components/SwitchLocaleLink
'
...
@@ -157,7 +156,6 @@ function WrongNetworkCard() {
...
@@ -157,7 +156,6 @@ function WrongNetworkCard() {
return
(
return
(
<>
<>
<
PageWrapper
>
<
PageWrapper
>
<
SwapPoolTabs
active=
"pool"
/>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
<
TitleRow
style=
{
{
marginTop
:
'
1rem
'
}
}
padding=
{
'
0
'
}
>
<
TitleRow
style=
{
{
marginTop
:
'
1rem
'
}
}
padding=
{
'
0
'
}
>
...
@@ -256,7 +254,6 @@ export default function Pool() {
...
@@ -256,7 +254,6 @@ export default function Pool() {
<
Trace
page=
{
PageName
.
POOL_PAGE
}
shouldLogImpression
>
<
Trace
page=
{
PageName
.
POOL_PAGE
}
shouldLogImpression
>
<>
<>
<
PageWrapper
>
<
PageWrapper
>
<
SwapPoolTabs
active=
"pool"
/>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
justify=
"center"
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
<
AutoColumn
gap=
"lg"
style=
{
{
width
:
'
100%
'
}
}
>
<
TitleRow
style=
{
{
marginTop
:
'
1rem
'
}
}
padding=
{
'
0
'
}
>
<
TitleRow
style=
{
{
marginTop
:
'
1rem
'
}
}
padding=
{
'
0
'
}
>
...
...
src/pages/Pool/v2.tsx
View file @
de6e3747
...
@@ -15,7 +15,6 @@ import { ButtonOutlined, ButtonPrimary, ButtonSecondary } from '../../components
...
@@ -15,7 +15,6 @@ import { ButtonOutlined, ButtonPrimary, ButtonSecondary } from '../../components
import
Card
from
'
../../components/Card
'
import
Card
from
'
../../components/Card
'
import
{
AutoColumn
}
from
'
../../components/Column
'
import
{
AutoColumn
}
from
'
../../components/Column
'
import
{
CardBGImage
,
CardNoise
,
CardSection
,
DataCard
}
from
'
../../components/earn/styled
'
import
{
CardBGImage
,
CardNoise
,
CardSection
,
DataCard
}
from
'
../../components/earn/styled
'
import
{
SwapPoolTabs
}
from
'
../../components/NavigationTabs
'
import
FullPositionCard
from
'
../../components/PositionCard
'
import
FullPositionCard
from
'
../../components/PositionCard
'
import
{
RowBetween
,
RowFixed
}
from
'
../../components/Row
'
import
{
RowBetween
,
RowFixed
}
from
'
../../components/Row
'
import
{
Dots
}
from
'
../../components/swap/styleds
'
import
{
Dots
}
from
'
../../components/swap/styleds
'
...
@@ -140,7 +139,6 @@ export default function Pool() {
...
@@ -140,7 +139,6 @@ export default function Pool() {
<
Trace
page=
{
PageName
.
POOL_PAGE
}
shouldLogImpression
>
<
Trace
page=
{
PageName
.
POOL_PAGE
}
shouldLogImpression
>
<>
<>
<
PageWrapper
>
<
PageWrapper
>
<
SwapPoolTabs
active=
{
'
pool
'
}
/>
<
VoteCard
>
<
VoteCard
>
<
CardBGImage
/>
<
CardBGImage
/>
<
CardNoise
/>
<
CardNoise
/>
...
...
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