Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bluejoyq
/
searchGuide
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
bluejoyq
2019-11-20 15:10:57 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
98b6d6ffd03c875a25a2e11b095700d307a0d12c
98b6d6ff
1 parent
fd424b74
add loading animation
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
17 deletions
searchGuide/.expo/packager-info.json
searchGuide/components/Home/Home.js
searchGuide/components/Main/Main.js
searchGuide/.expo/packager-info.json
View file @
98b6d6f
{
"devToolsPort"
:
19002
,
"expoServerPort"
:
19000
,
"packagerPort"
:
19001
,
"packagerPid"
:
12024
,
"packagerPort"
:
null
,
"packagerPid"
:
null
,
"expoServerNgrokUrl"
:
"https://s4-47j.anonymous.searchguide.exp.direct"
,
"packagerNgrokUrl"
:
"https://packager.s4-47j.anonymous.searchguide.exp.direct"
,
"ngrokPid"
:
22188
"ngrokPid"
:
31700
}
...
...
searchGuide/components/Home/Home.js
View file @
98b6d6f
import
React
from
'react'
;
import
{
View
}
from
'react-native'
;
import
{
View
,
ScrollView
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
import
Icon
from
'react-native-vector-icons/FontAwesome'
;
import
SearchBar
from
'../SearchBar/SearchBar'
;
...
...
@@ -10,9 +10,11 @@ const Home = ({searchResults}) => {
return
(
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#eee'
,
margin
:
0
,
padding
:
0
}}
>
<
SearchBar
/>
<
ScrollView
>
{
searchResults
&&
searchResults
.
map
((
searchResult
,
index
)
=>
(
<
SearchCard
key
=
{
index
}
title
=
{
searchResult
.
title
}
content
=
{
searchResult
.
passage
}
url
=
{
searchResult
.
url
}
/
>
))}
<
/ScrollView
>
<
/View
>
)
...
...
searchGuide/components/Main/Main.js
View file @
98b6d6f
...
...
@@ -4,19 +4,12 @@ import { connect } from 'react-redux';
import
Loading
from
'../Loading/Loading'
;
const
Main
=
({
isLoading
})
=>
{
if
(
isLoading
)
{
return
(
<>
<
Loading
/
>
<
AppTabContainer
/>
<
/
>
)
}
else
{
return
(
<
AppTabContainer
/>
)
}
return
(
<>
{
isLoading
&&
(
<
Loading
/>
)
}
<
AppTabContainer
/>
<
/
>
)
}
const
MainContainer
=
({
isLoading
})
=>
{
...
...
Please
register
or
login
to post a comment