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
9f33ed06
Unverified
Commit
9f33ed06
authored
Dec 05, 2022
by
lynn
Committed by
GitHub
Dec 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: improve network switching error to new design (#5543)
init
parent
85f4cec8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
FailedNetworkSwitchPopup.tsx
src/components/Popups/FailedNetworkSwitchPopup.tsx
+13
-10
PopupItem.tsx
src/components/Popups/PopupItem.tsx
+3
-3
No files found.
src/components/Popups/FailedNetworkSwitchPopup.tsx
View file @
9f33ed06
import
{
Trans
}
from
'
@lingui/macro
'
import
{
getChainInfo
}
from
'
constants/chainInfo
'
import
{
SupportedChainId
}
from
'
constants/chains
'
import
{
Alert
Circ
le
}
from
'
react-feather
'
import
{
Alert
Triang
le
}
from
'
react-feather
'
import
styled
,
{
useTheme
}
from
'
styled-components/macro
'
import
{
ThemedText
}
from
'
../../theme
'
...
...
@@ -18,16 +18,19 @@ export default function FailedNetworkSwitchPopup({ chainId }: { chainId: Support
return
(
<
RowNoFlex
>
<
div
style=
{
{
paddingRight
:
16
}
}
>
<
AlertCircle
color=
{
theme
.
deprecated_red1
}
size=
{
24
}
/>
</
div
>
<
AutoColumn
gap=
"sm"
>
<
ThemedText
.
DeprecatedBody
fontWeight=
{
500
}
>
<
Trans
>
Failed to switch networks from the Uniswap Interface. In order to use Uniswap on
{
chainInfo
.
label
}
, you must
change the network in your wallet.
</
Trans
>
</
ThemedText
.
DeprecatedBody
>
<
RowNoFlex
style=
{
{
alignItems
:
'
center
'
}
}
>
<
div
style=
{
{
paddingRight
:
13
}
}
>
<
AlertTriangle
color=
{
theme
.
accentWarning
}
size=
{
24
}
display=
"flex"
/>
</
div
>
<
ThemedText
.
SubHeader
>
<
Trans
>
Failed to switch networks
</
Trans
>
</
ThemedText
.
SubHeader
>
</
RowNoFlex
>
<
ThemedText
.
BodySmall
>
<
Trans
>
To use Uniswap on
{
chainInfo
.
label
}
, switch the network in your wallet’s settings.
</
Trans
>
</
ThemedText
.
BodySmall
>
</
AutoColumn
>
</
RowNoFlex
>
)
...
...
src/components/Popups/PopupItem.tsx
View file @
9f33ed06
...
...
@@ -10,8 +10,8 @@ import FailedNetworkSwitchPopup from './FailedNetworkSwitchPopup'
const
StyledClose
=
styled
(
X
)
`
position: absolute;
right:
1
0px;
top:
1
0px;
right:
2
0px;
top:
2
0px;
:hover {
cursor: pointer;
...
...
@@ -83,7 +83,7 @@ export default function PopupItem({
return
popupContent
?
(
<
Popup
>
<
StyledClose
color=
{
theme
.
deprecated_text2
}
onClick=
{
removeThisPopup
}
/>
<
StyledClose
color=
{
theme
.
textSecondary
}
onClick=
{
removeThisPopup
}
/>
{
popupContent
}
{
removeAfterMs
!==
null
?
<
AnimatedFader
style=
{
faderStyle
}
/>
:
null
}
</
Popup
>
...
...
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