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
7e0a630c
Commit
7e0a630c
authored
Nov 17, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes 4
parent
879161c1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
12 deletions
+13
-12
LatestBlocks.tsx
ui/home/LatestBlocks.tsx
+1
-1
LatestTxs.tsx
ui/home/LatestTxs.tsx
+1
-1
Home.tsx
ui/pages/Home.tsx
+1
-1
SearchBar.tsx
ui/snippets/searchBar/SearchBar.tsx
+2
-4
SearchBarDesktop.tsx
ui/snippets/searchBar/SearchBarDesktop.tsx
+5
-3
SearchBarMobileHome.tsx
ui/snippets/searchBar/SearchBarMobileHome.tsx
+3
-2
No files found.
ui/home/LatestBlocks.tsx
View file @
7e0a630c
...
...
@@ -69,7 +69,7 @@ const LatestBlocks = () => {
}
if
(
isError
)
{
content
=
<
Text
>
There are no blocks yet
.
</
Text
>;
content
=
<
Text
>
No data. Please reload page
.
</
Text
>;
}
if
(
data
)
{
...
...
ui/home/LatestTxs.tsx
View file @
7e0a630c
...
...
@@ -34,7 +34,7 @@ const LatestTransactions = () => {
}
if
(
isError
)
{
content
=
<
Text
mt=
{
4
}
>
There are no transactions
. Please reload page.
</
Text
>;
content
=
<
Text
mt=
{
4
}
>
No data
. Please reload page.
</
Text
>;
}
if
(
data
)
{
...
...
ui/pages/Home.tsx
View file @
7e0a630c
...
...
@@ -27,7 +27,7 @@ const Home = () => {
>
Welcome to Blockscout explorer
</
Heading
>
<
LightMode
><
SearchBar
backgroundColor=
"white"
isHomepage
/></
LightMode
>
<
LightMode
><
SearchBar
isHomepage
/></
LightMode
>
</
Box
>
<
Stats
/>
<
ChainIndicators
/>
...
...
ui/snippets/searchBar/SearchBar.tsx
View file @
7e0a630c
...
...
@@ -8,12 +8,11 @@ import SearchBarMobile from './SearchBarMobile';
import
SearchBarMobileHome
from
'
./SearchBarMobileHome
'
;
type
Props
=
{
backgroundColor
?:
string
;
withShadow
?:
boolean
;
isHomepage
?:
boolean
;
}
const
SearchBar
=
({
backgroundColor
,
isHomepage
,
withShadow
}:
Props
)
=>
{
const
SearchBar
=
({
isHomepage
,
withShadow
}:
Props
)
=>
{
const
[
value
,
setValue
]
=
React
.
useState
(
''
);
const
handleChange
=
React
.
useCallback
((
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
{
...
...
@@ -28,7 +27,7 @@ const SearchBar = ({ backgroundColor, isHomepage, withShadow }: Props) => {
return
(
<>
<
SearchBarDesktop
onChange=
{
handleChange
}
onSubmit=
{
handleSubmit
}
backgroundColor=
{
backgroundColor
}
/>
<
SearchBarDesktop
onChange=
{
handleChange
}
onSubmit=
{
handleSubmit
}
isHomepage=
{
isHomepage
}
/>
{
!
isHomepage
&&
(
<
SearchBarMobile
onChange=
{
handleChange
}
...
...
@@ -40,7 +39,6 @@ const SearchBar = ({ backgroundColor, isHomepage, withShadow }: Props) => {
<
SearchBarMobileHome
onChange=
{
handleChange
}
onSubmit=
{
handleSubmit
}
backgroundColor=
{
backgroundColor
}
/>
)
}
</>
...
...
ui/snippets/searchBar/SearchBarDesktop.tsx
View file @
7e0a630c
...
...
@@ -7,17 +7,17 @@ import searchIcon from 'icons/search.svg';
interface
Props
{
onChange
:
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
void
;
onSubmit
:
(
event
:
FormEvent
<
HTMLFormElement
>
)
=>
void
;
backgroundColor
?:
string
;
isHomepage
?:
boolean
;
}
const
SearchBarDesktop
=
({
onChange
,
onSubmit
,
backgroundColor
}:
Props
)
=>
{
const
SearchBarDesktop
=
({
onChange
,
onSubmit
,
isHomepage
}:
Props
)
=>
{
return
(
<
chakra
.
form
noValidate
onSubmit=
{
onSubmit
}
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
w=
"100%"
b
g=
{
backgroundColor
}
b
ackgroundColor=
{
isHomepage
?
'
white
'
:
'
none
'
}
borderRadius=
"10px"
>
<
InputGroup
>
...
...
@@ -30,7 +30,9 @@ const SearchBarDesktop = ({ onChange, onSubmit, backgroundColor }: Props) => {
placeholder=
"Search by addresses / transactions / block / token... "
ml=
"1px"
onChange=
{
onChange
}
border=
{
isHomepage
?
'
none
'
:
'
2px solid
'
}
borderColor=
{
useColorModeValue
(
'
blackAlpha.100
'
,
'
whiteAlpha.200
'
)
}
color=
{
useColorModeValue
(
'
black
'
,
'
white
'
)
}
/>
</
InputGroup
>
</
chakra
.
form
>
...
...
ui/snippets/searchBar/SearchBarMobileHome.tsx
View file @
7e0a630c
...
...
@@ -10,7 +10,7 @@ interface Props {
backgroundColor
?:
string
;
}
const
SearchBarMobileHome
=
({
onChange
,
onSubmit
,
backgroundColor
}:
Props
)
=>
{
const
SearchBarMobileHome
=
({
onChange
,
onSubmit
}:
Props
)
=>
{
const
commonProps
=
{
noValidate
:
true
,
onSubmit
:
onSubmit
,
...
...
@@ -22,7 +22,7 @@ const SearchBarMobileHome = ({ onChange, onSubmit, backgroundColor }: Props) =>
<
LightMode
>
<
chakra
.
form
{
...
commonProps
}
bgColor=
{
backgroundColor
}
bgColor=
"white"
h=
"60px"
borderRadius=
"10px"
>
...
...
@@ -36,6 +36,7 @@ const SearchBarMobileHome = ({ onChange, onSubmit, backgroundColor }: Props) =>
ml=
"1px"
onChange=
{
onChange
}
border=
"none"
color=
"black"
/>
</
InputGroup
>
</
chakra
.
form
>
...
...
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