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
60962726
Commit
60962726
authored
Apr 16, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional data for names
parent
194d4fdc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
SearchBarSuggestDomain.tsx
...ets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx
+12
-1
SearchBar.pw.tsx_default_search-by-domain-name-mobile-1.png
...archBar.pw.tsx_default_search-by-domain-name-mobile-1.png
+0
-0
SearchBar.pw.tsx_mobile_search-by-domain-name-mobile-1.png
...earchBar.pw.tsx_mobile_search-by-domain-name-mobile-1.png
+0
-0
No files found.
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx
View file @
60962726
...
@@ -3,6 +3,7 @@ import React from 'react';
...
@@ -3,6 +3,7 @@ import React from 'react';
import
type
{
SearchResultDomain
}
from
'
types/api/search
'
;
import
type
{
SearchResultDomain
}
from
'
types/api/search
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
highlightText
from
'
lib/highlightText
'
;
import
highlightText
from
'
lib/highlightText
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
...
@@ -39,6 +40,14 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => {
...
@@ -39,6 +40,14 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => {
const
isContractVerified
=
data
.
is_smart_contract_verified
&&
<
IconSvg
name=
"status/success"
boxSize=
"14px"
color=
"green.500"
flexShrink=
{
0
}
/>;
const
isContractVerified
=
data
.
is_smart_contract_verified
&&
<
IconSvg
name=
"status/success"
boxSize=
"14px"
color=
"green.500"
flexShrink=
{
0
}
/>;
const
expiresText
=
data
.
ens_info
?.
expiry_date
?
` expires
${
dayjs
(
data
.
ens_info
.
expiry_date
).
fromNow
()
}
`
:
''
;
const
ensNamesCount
=
data
?.
ens_info
.
names_count
>
39
?
'
40+
'
:
`+
${
data
.
ens_info
.
names_count
-
1
}
`
;
const
additionalInfo
=
(
<
Text
variant=
"secondary"
textAlign=
{
isMobile
?
'
start
'
:
'
end
'
}
>
{
data
?.
ens_info
.
names_count
>
1
?
ensNamesCount
:
expiresText
}
</
Text
>
);
if
(
isMobile
)
{
if
(
isMobile
)
{
return
(
return
(
<>
<>
...
@@ -50,12 +59,13 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => {
...
@@ -50,12 +59,13 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => {
{
address
}
{
address
}
{
isContractVerified
}
{
isContractVerified
}
</
Flex
>
</
Flex
>
{
additionalInfo
}
</>
</>
);
);
}
}
return
(
return
(
<
Grid
alignItems=
"center"
gridTemplateColumns=
"228px m
ax-content 24px
"
gap=
{
2
}
>
<
Grid
alignItems=
"center"
gridTemplateColumns=
"228px m
inmax(auto, max-content) auto
"
gap=
{
2
}
>
<
Flex
alignItems=
"center"
gap=
{
2
}
>
<
Flex
alignItems=
"center"
gap=
{
2
}
>
{
icon
}
{
icon
}
{
name
}
{
name
}
...
@@ -64,6 +74,7 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => {
...
@@ -64,6 +74,7 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => {
{
address
}
{
address
}
{
isContractVerified
}
{
isContractVerified
}
</
Flex
>
</
Flex
>
{
additionalInfo
}
</
Grid
>
</
Grid
>
);
);
};
};
...
...
ui/snippets/searchBar/__screenshots__/SearchBar.pw.tsx_default_search-by-domain-name-mobile-1.png
View replaced file @
194d4fdc
View file @
60962726
21.5 KB
|
W:
|
H:
22.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/snippets/searchBar/__screenshots__/SearchBar.pw.tsx_mobile_search-by-domain-name-mobile-1.png
View replaced file @
194d4fdc
View file @
60962726
12.8 KB
|
W:
|
H:
13.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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