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
36596d5e
Commit
36596d5e
authored
Nov 30, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt for mobile
parent
724a54b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
AddressDetails.tsx
ui/address/AddressDetails.tsx
+7
-2
No files found.
ui/address/AddressDetails.tsx
View file @
36596d5e
...
...
@@ -14,10 +14,12 @@ import qrCodeIcon from 'icons/qr_code.svg';
import
starOutlineIcon
from
'
icons/star_outline.svg
'
;
import
walletIcon
from
'
icons/wallet.svg
'
;
import
useFetch
from
'
lib/hooks/useFetch
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
ExternalLink
from
'
ui/shared/ExternalLink
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
interface
Props
{
addressQuery
:
UseQueryResult
<
TAddress
>
;
...
...
@@ -26,6 +28,7 @@ interface Props {
const
AddressDetails
=
({
addressQuery
}:
Props
)
=>
{
const
router
=
useRouter
();
const
fetch
=
useFetch
();
const
isMobile
=
useIsMobile
();
const
countersQuery
=
useQuery
<
unknown
,
unknown
,
AddressCounters
>
(
[
QueryKeys
.
addressCounters
,
router
.
query
.
id
],
...
...
@@ -57,7 +60,9 @@ const AddressDetails = ({ addressQuery }: Props) => {
<
Box
>
<
Flex
alignItems=
"center"
>
<
AddressIcon
hash=
{
addressQuery
.
data
.
hash
}
/>
<
Text
ml=
{
2
}
fontFamily=
"heading"
fontWeight=
{
500
}
>
{
addressQuery
.
data
.
hash
}
</
Text
>
<
Text
ml=
{
2
}
fontFamily=
"heading"
fontWeight=
{
500
}
>
{
isMobile
?
<
HashStringShorten
hash=
{
addressQuery
.
data
.
hash
}
/>
:
addressQuery
.
data
.
hash
}
</
Text
>
<
CopyToClipboard
text=
{
addressQuery
.
data
.
hash
}
/>
<
Icon
as=
{
metamaskIcon
}
boxSize=
{
6
}
ml=
{
2
}
/>
<
Button
variant=
"outline"
size=
"sm"
ml=
{
3
}
>
...
...
@@ -68,7 +73,7 @@ const AddressDetails = ({ addressQuery }: Props) => {
</
Button
>
</
Flex
>
{
explorers
.
length
>
0
&&
(
<
Flex
mt=
{
8
}
columnGap=
{
4
}
>
<
Flex
mt=
{
8
}
columnGap=
{
4
}
flexWrap=
"wrap"
>
<
Text
>
Verify with other explorers
</
Text
>
{
explorers
.
map
((
explorer
)
=>
{
const
url
=
new
URL
(
explorer
.
paths
.
tx
+
'
/
'
+
router
.
query
.
id
,
explorer
.
baseUrl
);
...
...
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