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
d016bdd8
Unverified
Commit
d016bdd8
authored
Nov 09, 2022
by
Jordan Frankfurt
Committed by
GitHub
Nov 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(identicon): fix wrapper border-radius (#5144)
* fix(identicon): fix wrapper border-radius * pr feedback
parent
491ae578
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
index.tsx
src/components/Identicon/index.tsx
+5
-3
ProfileAccountDetails.tsx
src/nft/components/profile/view/ProfileAccountDetails.tsx
+6
-2
No files found.
src/components/Identicon/index.tsx
View file @
d016bdd8
import
jazzicon
from
'
@metamask/jazzicon
'
import
jazzicon
from
'
@metamask/jazzicon
'
import
{
useWeb3React
}
from
'
@web3-react/core
'
import
{
useWeb3React
}
from
'
@web3-react/core
'
import
useENSAvatar
from
'
hooks/useENSAvatar
'
import
useENSAvatar
from
'
hooks/useENSAvatar
'
import
{
useLayoutEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
{
use
Callback
,
use
LayoutEffect
,
useMemo
,
useRef
,
useState
}
from
'
react
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
const
StyledIdenticon
=
styled
.
div
<
{
iconSize
:
number
}
>
`
const
StyledIdenticon
=
styled
.
div
<
{
iconSize
:
number
}
>
`
height:
${({
iconSize
})
=>
`
${
iconSize
}
px`
}
;
height:
${({
iconSize
})
=>
`
${
iconSize
}
px`
}
;
width:
${({
iconSize
})
=>
`
${
iconSize
}
px`
}
;
width:
${({
iconSize
})
=>
`
${
iconSize
}
px`
}
;
border-radius:
1.125rem
;
border-radius:
50%
;
background-color:
${({
theme
})
=>
theme
.
deprecated_bg4
}
;
background-color:
${({
theme
})
=>
theme
.
deprecated_bg4
}
;
font-size: initial;
font-size: initial;
`
`
...
@@ -41,10 +41,12 @@ export default function Identicon({ size }: { size?: number }) {
...
@@ -41,10 +41,12 @@ export default function Identicon({ size }: { size?: number }) {
return
return
},
[
icon
,
iconRef
])
},
[
icon
,
iconRef
])
const
handleError
=
useCallback
(()
=>
setFetchable
(
false
),
[])
return
(
return
(
<
StyledIdenticon
iconSize=
{
iconSize
}
>
<
StyledIdenticon
iconSize=
{
iconSize
}
>
{
avatar
&&
fetchable
?
(
{
avatar
&&
fetchable
?
(
<
StyledAvatar
alt=
"avatar"
src=
{
avatar
}
onError=
{
()
=>
setFetchable
(
false
)
}
></
StyledAvatar
>
<
StyledAvatar
alt=
"avatar"
src=
{
avatar
}
onError=
{
handleError
}
></
StyledAvatar
>
)
:
(
)
:
(
<
span
ref=
{
iconRef
}
/>
<
span
ref=
{
iconRef
}
/>
)
}
)
}
...
...
src/nft/components/profile/view/ProfileAccountDetails.tsx
View file @
d016bdd8
...
@@ -17,7 +17,11 @@ export const ProfileAccountDetails = () => {
...
@@ -17,7 +17,11 @@ export const ProfileAccountDetails = () => {
setCopied
(
account
??
''
)
setCopied
(
account
??
''
)
},
[
account
,
setCopied
])
},
[
account
,
setCopied
])
return
account
?
(
if
(
!
account
)
{
return
null
}
return
(
<
Row
className=
{
headlineLarge
}
marginBottom=
"48"
gap=
"4"
>
<
Row
className=
{
headlineLarge
}
marginBottom=
"48"
gap=
"4"
>
<
Identicon
size=
{
60
}
/>
<
Identicon
size=
{
60
}
/>
<
Box
textOverflow=
"ellipsis"
overflow=
"hidden"
marginLeft=
"8"
>
<
Box
textOverflow=
"ellipsis"
overflow=
"hidden"
marginLeft=
"8"
>
...
@@ -36,5 +40,5 @@ export const ProfileAccountDetails = () => {
...
@@ -36,5 +40,5 @@ export const ProfileAccountDetails = () => {
</
Box
>
</
Box
>
</
MouseoverTooltip
>
</
MouseoverTooltip
>
</
Row
>
</
Row
>
)
:
null
)
}
}
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