Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
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
vicotor
frontend
Commits
3e5a9973
Commit
3e5a9973
authored
Aug 31, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused components
parent
c5e2a185
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
110 deletions
+0
-110
TokenLogo.tsx
ui/shared/TokenLogo.tsx
+0
-32
AddressContractIcon.tsx
ui/shared/address/AddressContractIcon.tsx
+0
-39
AddressIcon.tsx
ui/shared/address/AddressIcon.tsx
+0
-39
No files found.
ui/shared/TokenLogo.tsx
deleted
100644 → 0
View file @
c5e2a185
import
{
Image
,
chakra
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
TokenInfo
}
from
'
types/api/token
'
;
import
TokenLogoPlaceholder
from
'
ui/shared/TokenLogoPlaceholder
'
;
export
interface
Props
{
data
?:
Pick
<
TokenInfo
,
|
'
icon_url
'
|
'
name
'
>
;
className
?:
string
;
isLoading
?:
boolean
;
}
// TODO @tom2drum - remove this component
const
TokenLogo
=
({
className
,
isLoading
,
data
}:
Props
)
=>
{
if
(
isLoading
)
{
return
<
Skeleton
className=
{
className
}
borderRadius=
"base"
flexShrink=
{
0
}
/>;
}
return
(
<
Image
borderRadius=
"base"
className=
{
className
}
src=
{
data
?.
icon_url
??
undefined
}
alt=
{
`${ data?.name || 'token' } logo`
}
fallback=
{
<
TokenLogoPlaceholder
className=
{
className
}
/>
}
/>
);
};
export
default
React
.
memo
(
chakra
(
TokenLogo
));
ui/shared/address/AddressContractIcon.tsx
deleted
100644 → 0
View file @
c5e2a185
import
{
Box
,
chakra
,
Tooltip
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
type
Props
=
{
className
?:
string
;
}
/**
* @deprecated use `ui/shared/entities/**` instead
*/
const
AddressContractIcon
=
({
className
}:
Props
)
=>
{
const
bgColor
=
useColorModeValue
(
'
gray.200
'
,
'
gray.600
'
);
const
color
=
useColorModeValue
(
'
gray.400
'
,
'
gray.200
'
);
return
(
<
Tooltip
label=
"Contract"
>
<
Box
className=
{
className
}
width=
"24px"
minWidth=
"24px"
height=
"24px"
borderRadius=
"12px"
backgroundColor=
{
bgColor
}
color=
{
color
}
display=
"inline-flex"
alignItems=
"center"
justifyContent=
"center"
fontWeight=
"700"
transitionProperty=
"background-color,color"
transitionDuration=
"normal"
transitionTimingFunction=
"ease"
>
C
</
Box
>
</
Tooltip
>
);
};
export
default
chakra
(
AddressContractIcon
);
ui/shared/address/AddressIcon.tsx
deleted
100644 → 0
View file @
c5e2a185
import
{
Box
,
chakra
,
Skeleton
,
Tooltip
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
Jazzicon
,
{
jsNumberForAddress
}
from
'
react-jazzicon
'
;
import
type
{
AddressParam
}
from
'
types/api/addressParams
'
;
import
AddressContractIcon
from
'
ui/shared/address/AddressContractIcon
'
;
type
Props
=
{
address
:
Pick
<
AddressParam
,
'
hash
'
|
'
is_contract
'
|
'
implementation_name
'
>
;
className
?:
string
;
isLoading
?:
boolean
;
}
// TODO @tom2drum - remove this component
/**
* @deprecated use `ui/shared/entities/**` instead
*/
const
AddressIcon
=
({
address
,
className
,
isLoading
}:
Props
)
=>
{
if
(
isLoading
)
{
return
<
Skeleton
boxSize=
{
6
}
className=
{
className
}
borderRadius=
"full"
flexShrink=
{
0
}
/>;
}
if
(
address
.
is_contract
)
{
return
(
<
AddressContractIcon
className=
{
className
}
/>
);
}
return
(
<
Tooltip
label=
{
address
.
implementation_name
}
>
<
Box
className=
{
className
}
boxSize=
{
6
}
display=
"inline-flex"
>
<
Jazzicon
diameter=
{
24
}
seed=
{
jsNumberForAddress
(
address
.
hash
)
}
/>
</
Box
>
</
Tooltip
>
);
};
export
default
chakra
(
AddressIcon
);
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