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
7f1f96e2
Commit
7f1f96e2
authored
Dec 06, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming
parent
52bcc45d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
AddressDetails.tsx
ui/address/AddressDetails.tsx
+1
-1
TokenSelectButton.tsx
ui/address/tokenSelect/TokenSelectButton.tsx
+2
-2
TokenSelectItem.tsx
ui/address/tokenSelect/TokenSelectItem.tsx
+2
-2
Tokens.tsx
ui/address/tokenSelect/Tokens.tsx
+4
-4
utils.ts
ui/address/tokenSelect/utils.ts
+0
-0
No files found.
ui/address/AddressDetails.tsx
View file @
7f1f96e2
...
@@ -21,7 +21,7 @@ import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
...
@@ -21,7 +21,7 @@ import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
import
ExternalLink
from
'
ui/shared/ExternalLink
'
;
import
ExternalLink
from
'
ui/shared/ExternalLink
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
Tokens
from
'
./
details
/Tokens
'
;
import
Tokens
from
'
./
tokenSelect
/Tokens
'
;
interface
Props
{
interface
Props
{
addressQuery
:
UseQueryResult
<
TAddress
>
;
addressQuery
:
UseQueryResult
<
TAddress
>
;
...
...
ui/address/
details/Tokens
Button.tsx
→
ui/address/
tokenSelect/TokenSelect
Button.tsx
View file @
7f1f96e2
...
@@ -14,7 +14,7 @@ interface Props {
...
@@ -14,7 +14,7 @@ interface Props {
data
:
Array
<
EnhancedData
>
;
data
:
Array
<
EnhancedData
>
;
}
}
const
Token
s
Button
=
({
isOpen
,
onClick
,
data
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
Token
Select
Button
=
({
isOpen
,
onClick
,
data
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
totalBn
=
data
.
reduce
((
result
,
item
)
=>
!
item
.
usd
?
result
:
result
.
plus
(
BigNumber
(
item
.
usd
)),
ZERO
);
const
totalBn
=
data
.
reduce
((
result
,
item
)
=>
!
item
.
usd
?
result
:
result
.
plus
(
BigNumber
(
item
.
usd
)),
ZERO
);
return
(
return
(
...
@@ -33,4 +33,4 @@ const TokensButton = ({ isOpen, onClick, data }: Props, ref: React.ForwardedRef<
...
@@ -33,4 +33,4 @@ const TokensButton = ({ isOpen, onClick, data }: Props, ref: React.ForwardedRef<
);
);
};
};
export
default
React
.
forwardRef
(
Token
s
Button
);
export
default
React
.
forwardRef
(
Token
Select
Button
);
ui/address/
details/Token
Item.tsx
→
ui/address/
tokenSelect/TokenSelect
Item.tsx
View file @
7f1f96e2
...
@@ -11,7 +11,7 @@ interface Props {
...
@@ -11,7 +11,7 @@ interface Props {
data
:
EnhancedData
;
data
:
EnhancedData
;
}
}
const
TokenItem
=
({
data
}:
Props
)
=>
{
const
Token
Select
Item
=
({
data
}:
Props
)
=>
{
const
secondRow
=
(()
=>
{
const
secondRow
=
(()
=>
{
switch
(
data
.
token
.
type
)
{
switch
(
data
.
token
.
type
)
{
...
@@ -65,4 +65,4 @@ const TokenItem = ({ data }: Props) => {
...
@@ -65,4 +65,4 @@ const TokenItem = ({ data }: Props) => {
);
);
};
};
export
default
React
.
memo
(
TokenItem
);
export
default
React
.
memo
(
Token
Select
Item
);
ui/address/
details
/Tokens.tsx
→
ui/address/
tokenSelect
/Tokens.tsx
View file @
7f1f96e2
...
@@ -16,8 +16,8 @@ import type { TokenType } from 'types/api/tokenInfo';
...
@@ -16,8 +16,8 @@ import type { TokenType } from 'types/api/tokenInfo';
import
arrowIcon
from
'
icons/arrows/east.svg
'
;
import
arrowIcon
from
'
icons/arrows/east.svg
'
;
import
searchIcon
from
'
icons/search.svg
'
;
import
searchIcon
from
'
icons/search.svg
'
;
import
Token
Item
from
'
./TokenItem
'
;
import
Token
SelectButton
from
'
./TokenSelectButton
'
;
import
Token
sButton
from
'
./TokensButton
'
;
import
Token
SelectItem
from
'
./TokenSelectItem
'
;
import
type
{
Sort
}
from
'
./utils
'
;
import
type
{
Sort
}
from
'
./utils
'
;
import
{
SORTABLE_TOKENS
,
sortTokenGroups
,
sortingFns
,
calculateUsdValue
,
filterTokens
}
from
'
./utils
'
;
import
{
SORTABLE_TOKENS
,
sortTokenGroups
,
sortingFns
,
calculateUsdValue
,
filterTokens
}
from
'
./utils
'
;
...
@@ -55,7 +55,7 @@ const Tokens = ({ data }: Props) => {
...
@@ -55,7 +55,7 @@ const Tokens = ({ data }: Props) => {
return
(
return
(
<
Popover
isOpen=
{
isOpen
}
onClose=
{
onClose
}
placement=
"bottom-start"
isLazy
>
<
Popover
isOpen=
{
isOpen
}
onClose=
{
onClose
}
placement=
"bottom-start"
isLazy
>
<
PopoverTrigger
>
<
PopoverTrigger
>
<
Token
s
Button
isOpen=
{
isOpen
}
onClick=
{
onToggle
}
data=
{
modifiedData
}
/>
<
Token
Select
Button
isOpen=
{
isOpen
}
onClick=
{
onToggle
}
data=
{
modifiedData
}
/>
</
PopoverTrigger
>
</
PopoverTrigger
>
<
PopoverContent
w=
"355px"
maxH=
"450px"
overflowY=
"scroll"
>
<
PopoverContent
w=
"355px"
maxH=
"450px"
overflowY=
"scroll"
>
<
PopoverBody
px=
{
4
}
py=
{
6
}
bgColor=
{
bgColor
}
boxShadow=
"2xl"
>
<
PopoverBody
px=
{
4
}
py=
{
6
}
bgColor=
{
bgColor
}
boxShadow=
"2xl"
>
...
@@ -98,7 +98,7 @@ const Tokens = ({ data }: Props) => {
...
@@ -98,7 +98,7 @@ const Tokens = ({ data }: Props) => {
</
Link
>
</
Link
>
)
}
)
}
</
Flex
>
</
Flex
>
{
tokenInfo
.
sort
(
sortingFns
[
type
](
sortDirection
)).
map
((
data
)
=>
<
TokenItem
key=
{
data
.
token
.
address
+
data
.
token_id
}
data=
{
data
}
/>)
}
{
tokenInfo
.
sort
(
sortingFns
[
type
](
sortDirection
)).
map
((
data
)
=>
<
Token
Select
Item
key=
{
data
.
token
.
address
+
data
.
token_id
}
data=
{
data
}
/>)
}
</
Box
>
</
Box
>
);
);
})
}
})
}
...
...
ui/address/
details
/utils.ts
→
ui/address/
tokenSelect
/utils.ts
View file @
7f1f96e2
File moved
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