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
5d19b2a1
Commit
5d19b2a1
authored
Dec 22, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manage incomplete data
parent
85f1bcb4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
47 deletions
+56
-47
getPageType.ts
lib/mixpanel/getPageType.ts
+2
-0
ens.ts
types/api/ens.ts
+4
-4
AddressEnsDomains.tsx
ui/address/ensDomains/AddressEnsDomains.tsx
+2
-0
NameDomainDetails.tsx
ui/nameDomain/NameDomainDetails.tsx
+38
-34
NameDomain.tsx
ui/pages/NameDomain.tsx
+10
-9
No files found.
lib/mixpanel/getPageType.ts
View file @
5d19b2a1
...
@@ -38,6 +38,8 @@ export const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
...
@@ -38,6 +38,8 @@ export const PAGE_TYPE_DICT: Record<Route['pathname'], string> = {
'
/zkevm-l2-txn-batches
'
:
'
ZkEvm L2 Tx batches
'
,
'
/zkevm-l2-txn-batches
'
:
'
ZkEvm L2 Tx batches
'
,
'
/zkevm-l2-txn-batch/[number]
'
:
'
ZkEvm L2 Tx batch details
'
,
'
/zkevm-l2-txn-batch/[number]
'
:
'
ZkEvm L2 Tx batch details
'
,
'
/404
'
:
'
404
'
,
'
/404
'
:
'
404
'
,
'
/name-domains
'
:
'
Domains search and resolve
'
,
'
/name-domains/[name]
'
:
'
Domain details
'
,
// service routes, added only to make typescript happy
// service routes, added only to make typescript happy
'
/login
'
:
'
Login
'
,
'
/login
'
:
'
Login
'
,
...
...
types/api/ens.ts
View file @
5d19b2a1
...
@@ -3,10 +3,10 @@ export interface EnsDomain {
...
@@ -3,10 +3,10 @@ export interface EnsDomain {
name
:
string
;
name
:
string
;
resolvedAddress
:
{
resolvedAddress
:
{
hash
:
string
;
hash
:
string
;
};
}
|
null
;
owner
:
{
owner
:
{
hash
:
string
;
hash
:
string
;
};
}
|
null
;
registrationDate
?:
string
;
registrationDate
?:
string
;
expiryDate
?:
string
;
expiryDate
?:
string
;
}
}
...
@@ -15,7 +15,7 @@ export interface EnsDomainDetailed extends EnsDomain {
...
@@ -15,7 +15,7 @@ export interface EnsDomainDetailed extends EnsDomain {
tokenId
:
string
;
tokenId
:
string
;
registrant
:
{
registrant
:
{
hash
:
string
;
hash
:
string
;
};
}
|
null
;
otherAddresses
:
Record
<
string
,
string
>
;
otherAddresses
:
Record
<
string
,
string
>
;
}
}
...
@@ -24,7 +24,7 @@ export interface EnsDomainEvent {
...
@@ -24,7 +24,7 @@ export interface EnsDomainEvent {
timestamp
:
string
;
timestamp
:
string
;
fromAddress
:
{
fromAddress
:
{
hash
:
string
;
hash
:
string
;
};
}
|
null
;
action
?:
string
;
action
?:
string
;
}
}
...
...
ui/address/ensDomains/AddressEnsDomains.tsx
View file @
5d19b2a1
...
@@ -40,10 +40,12 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
...
@@ -40,10 +40,12 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
const
mainDomain
=
data
.
items
.
find
((
domain
)
=>
domain
.
name
===
mainDomainName
);
const
mainDomain
=
data
.
items
.
find
((
domain
)
=>
domain
.
name
===
mainDomainName
);
const
ownedDomains
=
data
.
items
.
filter
((
domain
)
=>
const
ownedDomains
=
data
.
items
.
filter
((
domain
)
=>
domain
.
owner
&&
domain
.
owner
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
()
&&
domain
.
owner
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
()
&&
domain
.
name
!==
mainDomainName
,
domain
.
name
!==
mainDomainName
,
);
);
const
resolvedDomains
=
data
.
items
.
filter
((
domain
)
=>
const
resolvedDomains
=
data
.
items
.
filter
((
domain
)
=>
domain
.
resolvedAddress
&&
domain
.
resolvedAddress
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
()
&&
domain
.
resolvedAddress
.
hash
.
toLowerCase
()
===
addressHash
.
toLowerCase
()
&&
domain
.
name
!==
mainDomainName
,
domain
.
name
!==
mainDomainName
,
);
);
...
...
ui/nameDomain/NameDomainDetails.tsx
View file @
5d19b2a1
...
@@ -71,42 +71,46 @@ const NameDomainDetails = ({ query }: Props) => {
...
@@ -71,42 +71,46 @@ const NameDomainDetails = ({ query }: Props) => {
</
Skeleton
>
</
Skeleton
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
)
}
)
}
<
DetailsInfoItem
{
query
.
data
?.
registrant
&&
(
title=
"Registrant"
<
DetailsInfoItem
hint=
"The account that owns the domain name and has the rights to edit its ownership and records"
title=
"Registrant"
isLoading=
{
isLoading
}
hint=
"The account that owns the domain name and has the rights to edit its ownership and records"
columnGap=
{
2
}
flexWrap=
"nowrap"
>
<
AddressEntity
address=
{
query
.
data
?.
registrant
}
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
columnGap=
{
2
}
{
/* TODO @tom2drum add correct href */
}
flexWrap=
"nowrap"
<
Tooltip
label=
"Lookup for related domain names"
>
>
<
LinkInternal
flexShrink=
{
0
}
display=
"inline-flex"
>
<
AddressEntity
<
Icon
as=
{
iconSearch
}
boxSize=
{
5
}
isLoading=
{
isLoading
}
/>
address=
{
query
.
data
.
registrant
}
</
LinkInternal
>
isLoading=
{
isLoading
}
</
Tooltip
>
/>
</
DetailsInfoItem
>
{
/* TODO @tom2drum add correct href */
}
<
DetailsInfoItem
<
Tooltip
label=
"Lookup for related domain names"
>
title=
"Controller"
<
LinkInternal
flexShrink=
{
0
}
display=
"inline-flex"
>
hint=
"The account that owns the rights to edit the records of this domain name"
<
Icon
as=
{
iconSearch
}
boxSize=
{
5
}
isLoading=
{
isLoading
}
/>
isLoading=
{
isLoading
}
</
LinkInternal
>
columnGap=
{
2
}
</
Tooltip
>
flexWrap=
"nowrap"
</
DetailsInfoItem
>
>
)
}
<
AddressEntity
{
query
.
data
?.
owner
&&
(
address=
{
query
.
data
?.
owner
}
<
DetailsInfoItem
title=
"Controller"
hint=
"The account that owns the rights to edit the records of this domain name"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
/>
columnGap=
{
2
}
{
/* TODO @tom2drum add correct href */
}
flexWrap=
"nowrap"
<
Tooltip
label=
"Lookup for related domain names"
>
>
<
LinkInternal
flexShrink=
{
0
}
display=
"inline-flex"
>
<
AddressEntity
<
Icon
as=
{
iconSearch
}
boxSize=
{
5
}
isLoading=
{
isLoading
}
/>
address=
{
query
.
data
.
owner
}
</
LinkInternal
>
isLoading=
{
isLoading
}
</
Tooltip
>
/>
</
DetailsInfoItem
>
{
/* TODO @tom2drum add correct href */
}
<
Tooltip
label=
"Lookup for related domain names"
>
<
LinkInternal
flexShrink=
{
0
}
display=
"inline-flex"
>
<
Icon
as=
{
iconSearch
}
boxSize=
{
5
}
isLoading=
{
isLoading
}
/>
</
LinkInternal
>
</
Tooltip
>
</
DetailsInfoItem
>
)
}
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Token ID"
title=
"Token ID"
hint=
"The Token ID of this domain name NFT"
hint=
"The Token ID of this domain name NFT"
...
...
ui/pages/NameDomain.tsx
View file @
5d19b2a1
...
@@ -14,7 +14,6 @@ import NameDomainDetails from 'ui/nameDomain/NameDomainDetails';
...
@@ -14,7 +14,6 @@ import NameDomainDetails from 'ui/nameDomain/NameDomainDetails';
import
NameDomainHistory
from
'
ui/nameDomain/NameDomainHistory
'
;
import
NameDomainHistory
from
'
ui/nameDomain/NameDomainHistory
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
Icon
from
'
ui/shared/chakra/Icon
'
;
import
Icon
from
'
ui/shared/chakra/Icon
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
EnsEntity
from
'
ui/shared/entities/ens/EnsEntity
'
;
import
EnsEntity
from
'
ui/shared/entities/ens/EnsEntity
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
import
LinkInternal
from
'
ui/shared/LinkInternal
'
;
...
@@ -43,7 +42,7 @@ const NameDomain = () => {
...
@@ -43,7 +42,7 @@ const NameDomain = () => {
const
tabIndex
=
useTabIndexFromQuery
(
tabs
);
const
tabIndex
=
useTabIndexFromQuery
(
tabs
);
if
(
infoQuery
.
isError
)
{
if
(
infoQuery
.
isError
)
{
return
<
DataFetchAlert
/>
;
throw
new
Error
(
undefined
,
{
cause
:
infoQuery
.
error
})
;
}
}
const
isLoading
=
infoQuery
.
isPlaceholderData
;
const
isLoading
=
infoQuery
.
isPlaceholderData
;
...
@@ -56,13 +55,15 @@ const NameDomain = () => {
...
@@ -56,13 +55,15 @@ const NameDomain = () => {
noLink
noLink
maxW=
"300px"
maxW=
"300px"
/>
/>
<
AddressEntity
{
infoQuery
.
data
?.
resolvedAddress
&&
(
address=
{
infoQuery
.
data
?.
resolvedAddress
}
<
AddressEntity
isLoading=
{
isLoading
}
address=
{
infoQuery
.
data
?.
resolvedAddress
}
truncation=
{
isMobile
?
'
constant
'
:
'
dynamic
'
}
isLoading=
{
isLoading
}
noLink
truncation=
{
isMobile
?
'
constant
'
:
'
dynamic
'
}
flexShrink=
{
0
}
noLink
/>
flexShrink=
{
0
}
/>
)
}
{
/* TODO @tom2drum add correct href */
}
{
/* TODO @tom2drum add correct href */
}
<
Tooltip
label=
"Lookup for related domain names"
>
<
Tooltip
label=
"Lookup for related domain names"
>
<
LinkInternal
flexShrink=
{
0
}
display=
"inline-flex"
>
<
LinkInternal
flexShrink=
{
0
}
display=
"inline-flex"
>
...
...
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