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
be89167e
Unverified
Commit
be89167e
authored
Nov 04, 2024
by
tom goriunov
Committed by
GitHub
Nov 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Celo: `Epoch rewards` tab bugs on mobile (#2346)
Fixes #2342
parent
f53a3601
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
16 deletions
+10
-16
ContractAbiItem.tsx
ui/address/contract/methods/ContractAbiItem.tsx
+2
-10
BlockEpochElectionRewardsListItem.tsx
ui/block/epochRewards/BlockEpochElectionRewardsListItem.tsx
+2
-2
BlockEpochRewardsDistribution.tsx
ui/block/epochRewards/BlockEpochRewardsDistribution.tsx
+5
-3
BlockEpochElectionRewards.pw.tsx_mobile_base-view-mobile-1.png
...EpochElectionRewards.pw.tsx_mobile_base-view-mobile-1.png
+0
-0
CopyToClipboard.tsx
ui/shared/CopyToClipboard.tsx
+1
-0
AddressFromTo.tsx
ui/shared/address/AddressFromTo.tsx
+0
-1
No files found.
ui/address/contract/methods/ContractAbiItem.tsx
View file @
be89167e
...
@@ -40,14 +40,6 @@ const ContractAbiItem = ({ data, index, id, addressHash, sourceAddress, tab, onS
...
@@ -40,14 +40,6 @@ const ContractAbiItem = ({ data, index, id, addressHash, sourceAddress, tab, onS
});
});
},
[
addressHash
,
data
,
tab
,
sourceAddress
]);
},
[
addressHash
,
data
,
tab
,
sourceAddress
]);
const
handleCopyLinkClick
=
React
.
useCallback
((
event
:
React
.
MouseEvent
)
=>
{
event
.
stopPropagation
();
},
[]);
const
handleCopyMethodIdClick
=
React
.
useCallback
((
event
:
React
.
MouseEvent
)
=>
{
event
.
stopPropagation
();
},
[]);
const
handleReset
=
React
.
useCallback
(()
=>
{
const
handleReset
=
React
.
useCallback
(()
=>
{
setAttempt
((
prev
)
=>
prev
+
1
);
setAttempt
((
prev
)
=>
prev
+
1
);
},
[]);
},
[]);
...
@@ -71,7 +63,7 @@ const ContractAbiItem = ({ data, index, id, addressHash, sourceAddress, tab, onS
...
@@ -71,7 +63,7 @@ const ContractAbiItem = ({ data, index, id, addressHash, sourceAddress, tab, onS
alignItems=
"center"
alignItems=
"center"
columnGap=
{
2
}
columnGap=
{
2
}
>
>
<
CopyToClipboard
text=
{
url
}
onClick=
{
handleCopyLinkClick
}
type=
"link"
ml=
{
0
}
color=
"text_secondary"
/>
<
CopyToClipboard
text=
{
url
}
type=
"link"
ml=
{
0
}
color=
"text_secondary"
/>
<
Box
as=
"div"
fontWeight=
{
500
}
display=
"flex"
alignItems=
"center"
>
<
Box
as=
"div"
fontWeight=
{
500
}
display=
"flex"
alignItems=
"center"
>
{
index
+
1
}
.
{
data
.
type
===
'
fallback
'
||
data
.
type
===
'
receive
'
?
data
.
type
:
data
.
name
}
{
index
+
1
}
.
{
data
.
type
===
'
fallback
'
||
data
.
type
===
'
receive
'
?
data
.
type
:
data
.
name
}
{
data
.
type
===
'
fallback
'
&&
(
{
data
.
type
===
'
fallback
'
&&
(
...
@@ -101,7 +93,7 @@ const ContractAbiItem = ({ data, index, id, addressHash, sourceAddress, tab, onS
...
@@ -101,7 +93,7 @@ const ContractAbiItem = ({ data, index, id, addressHash, sourceAddress, tab, onS
{
'
method_id
'
in
data
&&
(
{
'
method_id
'
in
data
&&
(
<
Tag
display=
"inline-flex"
alignItems=
"center"
flexShrink=
{
0
}
>
<
Tag
display=
"inline-flex"
alignItems=
"center"
flexShrink=
{
0
}
>
{
data
.
method_id
}
{
data
.
method_id
}
<
CopyToClipboard
text=
{
data
.
method_id
}
onClick=
{
handleCopyMethodIdClick
}
/>
<
CopyToClipboard
text=
{
data
.
method_id
}
/>
</
Tag
>
</
Tag
>
)
}
)
}
<
AccordionIcon
transform=
{
isExpanded
?
'
rotate(0deg)
'
:
'
rotate(-90deg)
'
}
color=
"gray.500"
/>
<
AccordionIcon
transform=
{
isExpanded
?
'
rotate(0deg)
'
:
'
rotate(-90deg)
'
}
color=
"gray.500"
/>
...
...
ui/block/epochRewards/BlockEpochElectionRewardsListItem.tsx
View file @
be89167e
...
@@ -34,7 +34,7 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
...
@@ -34,7 +34,7 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
onClick=
{
isLoading
||
!
data
.
count
?
undefined
:
section
.
onToggle
}
onClick=
{
isLoading
||
!
data
.
count
?
undefined
:
section
.
onToggle
}
cursor=
{
isLoading
||
!
data
.
count
?
undefined
:
'
pointer
'
}
cursor=
{
isLoading
||
!
data
.
count
?
undefined
:
'
pointer
'
}
>
>
<
Flex
my=
"3px"
columnGap=
{
3
}
alignItems=
"center"
flexWrap=
"wrap"
rowGap=
{
1
}
>
<
Flex
my=
"3px"
columnGap=
{
3
}
alignItems=
"center"
flexWrap=
"wrap"
rowGap=
{
2
}
>
{
data
.
count
?
(
{
data
.
count
?
(
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"flex"
borderRadius=
"sm"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
display=
"flex"
borderRadius=
"sm"
>
<
IconButton
<
IconButton
...
@@ -55,7 +55,7 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
...
@@ -55,7 +55,7 @@ const BlockEpochElectionRewardsListItem = ({ data, isLoading, type }: Props) =>
)
:
<
Box
boxSize=
{
6
}
/>
}
)
:
<
Box
boxSize=
{
6
}
/>
}
<
EpochRewardTypeTag
type=
{
type
}
isLoading=
{
isLoading
}
/>
<
EpochRewardTypeTag
type=
{
type
}
isLoading=
{
isLoading
}
/>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
data
.
count
}
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
data
.
count
}
</
Skeleton
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
ml=
"auto"
fontWeight=
{
500
}
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
ml=
{
{
base
:
9
,
lg
:
'
auto
'
}
}
w=
{
{
base
:
'
100%
'
,
lg
:
'
fit-content
'
}
}
fontWeight=
{
500
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
valueStr
}
</
Skeleton
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
{
valueStr
}
</
Skeleton
>
<
TokenEntity
<
TokenEntity
token=
{
data
.
token
}
token=
{
data
.
token
}
...
...
ui/block/epochRewards/BlockEpochRewardsDistribution.tsx
View file @
be89167e
...
@@ -3,6 +3,7 @@ import React from 'react';
...
@@ -3,6 +3,7 @@ import React from 'react';
import
type
{
BlockEpoch
}
from
'
types/api/block
'
;
import
type
{
BlockEpoch
}
from
'
types/api/block
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
*
as
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
*
as
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
TokenTransferSnippet
from
'
ui/shared/TokenTransferSnippet/TokenTransferSnippet
'
;
import
TokenTransferSnippet
from
'
ui/shared/TokenTransferSnippet/TokenTransferSnippet
'
;
...
@@ -12,6 +13,7 @@ interface Props {
...
@@ -12,6 +13,7 @@ interface Props {
}
}
const
BlockEpochRewardsDistribution
=
({
data
,
isLoading
}:
Props
)
=>
{
const
BlockEpochRewardsDistribution
=
({
data
,
isLoading
}:
Props
)
=>
{
const
isMobile
=
useIsMobile
();
if
(
!
data
.
distribution
.
community_transfer
&&
!
data
.
distribution
.
carbon_offsetting_transfer
&&
!
data
.
distribution
.
reserve_bolster_transfer
)
{
if
(
!
data
.
distribution
.
community_transfer
&&
!
data
.
distribution
.
carbon_offsetting_transfer
&&
!
data
.
distribution
.
reserve_bolster_transfer
)
{
return
null
;
return
null
;
...
@@ -33,7 +35,7 @@ const BlockEpochRewardsDistribution = ({ data, isLoading }: Props) => {
...
@@ -33,7 +35,7 @@ const BlockEpochRewardsDistribution = ({ data, isLoading }: Props) => {
Community fund
Community fund
</
DetailsInfoItem
.
Label
>
</
DetailsInfoItem
.
Label
>
<
DetailsInfoItem
.
Value
>
<
DetailsInfoItem
.
Value
>
<
TokenTransferSnippet
data=
{
data
.
distribution
.
community_transfer
}
isLoading=
{
isLoading
}
noAddressIcons=
{
fals
e
}
/>
<
TokenTransferSnippet
data=
{
data
.
distribution
.
community_transfer
}
isLoading=
{
isLoading
}
noAddressIcons=
{
isMobil
e
}
/>
</
DetailsInfoItem
.
Value
>
</
DetailsInfoItem
.
Value
>
</>
</>
)
}
)
}
...
@@ -46,7 +48,7 @@ const BlockEpochRewardsDistribution = ({ data, isLoading }: Props) => {
...
@@ -46,7 +48,7 @@ const BlockEpochRewardsDistribution = ({ data, isLoading }: Props) => {
Carbon offset fund
Carbon offset fund
</
DetailsInfoItem
.
Label
>
</
DetailsInfoItem
.
Label
>
<
DetailsInfoItem
.
Value
>
<
DetailsInfoItem
.
Value
>
<
TokenTransferSnippet
data=
{
data
.
distribution
.
carbon_offsetting_transfer
}
isLoading=
{
isLoading
}
noAddressIcons=
{
fals
e
}
/>
<
TokenTransferSnippet
data=
{
data
.
distribution
.
carbon_offsetting_transfer
}
isLoading=
{
isLoading
}
noAddressIcons=
{
isMobil
e
}
/>
</
DetailsInfoItem
.
Value
>
</
DetailsInfoItem
.
Value
>
</>
</>
)
}
)
}
...
@@ -59,7 +61,7 @@ const BlockEpochRewardsDistribution = ({ data, isLoading }: Props) => {
...
@@ -59,7 +61,7 @@ const BlockEpochRewardsDistribution = ({ data, isLoading }: Props) => {
Reserve bolster
Reserve bolster
</
DetailsInfoItem
.
Label
>
</
DetailsInfoItem
.
Label
>
<
DetailsInfoItem
.
Value
>
<
DetailsInfoItem
.
Value
>
<
TokenTransferSnippet
data=
{
data
.
distribution
.
reserve_bolster_transfer
}
isLoading=
{
isLoading
}
noAddressIcons=
{
fals
e
}
/>
<
TokenTransferSnippet
data=
{
data
.
distribution
.
reserve_bolster_transfer
}
isLoading=
{
isLoading
}
noAddressIcons=
{
isMobil
e
}
/>
</
DetailsInfoItem
.
Value
>
</
DetailsInfoItem
.
Value
>
</>
</>
)
}
)
}
...
...
ui/block/epochRewards/__screenshots__/BlockEpochElectionRewards.pw.tsx_mobile_base-view-mobile-1.png
View replaced file @
f53a3601
View file @
be89167e
65 KB
|
W:
|
H:
65.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/shared/CopyToClipboard.tsx
View file @
be89167e
...
@@ -34,6 +34,7 @@ const CopyToClipboard = ({ text, className, isLoading, onClick, size = 5, type,
...
@@ -34,6 +34,7 @@ const CopyToClipboard = ({ text, className, isLoading, onClick, size = 5, type,
},
[
hasCopied
]);
},
[
hasCopied
]);
const
handleClick
=
React
.
useCallback
((
event
:
React
.
MouseEvent
)
=>
{
const
handleClick
=
React
.
useCallback
((
event
:
React
.
MouseEvent
)
=>
{
event
.
stopPropagation
();
onCopy
();
onCopy
();
onClick
?.(
event
);
onClick
?.(
event
);
},
[
onClick
,
onCopy
]);
},
[
onClick
,
onCopy
]);
...
...
ui/shared/address/AddressFromTo.tsx
View file @
be89167e
...
@@ -55,7 +55,6 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
...
@@ -55,7 +55,6 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
truncation=
"constant"
truncation=
"constant"
maxW=
"calc(100% - 28px)"
maxW=
"calc(100% - 28px)"
w=
"min-content"
w=
"min-content"
/>
/>
</
Flex
>
</
Flex
>
{
to
&&
(
{
to
&&
(
...
...
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