Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
fb137040
Commit
fb137040
authored
Sep 25, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix home searchbar
parent
cf4ced4f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
23 deletions
+18
-23
components/Form/ChangePasswordForm.js
+1
-0
components/Form/LoginForm.js
+2
-2
screens/Private/SmartMeterScreen/SmartMeterScreen.js
+15
-21
No files found.
components/Form/ChangePasswordForm.js
View file @
fb137040
...
...
@@ -29,6 +29,7 @@ class ChangePassword extends React.Component {
<
View
style
=
{
styles
.
container
}
>
<
Text
style
=
{
theme
.
description
}
>
Current
Password
<
/Text
>
<
Field
hideCheckmark
forwardRef
ref
=
{
c
=>
(
this
.
currentPass
=
c
)}
refField
=
"currentPass"
...
...
components/Form/LoginForm.js
View file @
fb137040
import
React
,
{
Component
}
from
'react'
;
import
{
Field
,
reduxForm
}
from
'redux-form'
;
import
{
View
,
KeyboardAvoidingView
}
from
'react-native'
;
import
{
KeyboardAvoidingView
}
from
'react-native'
;
import
Input
from
'./Input'
;
import
{
theme
}
from
'../../constants/Styles'
;
import
GradientBtn
from
'../GradientBtn'
;
...
...
@@ -28,7 +28,7 @@ class Login extends Component {
keyboardType
=
"default"
component
=
{
Input
}
validate
=
{[
required
]}
placeholder
=
{
'
Username
'
}
placeholder
=
{
'
E-mail
'
}
/
>
<
Field
hideCheckmark
...
...
screens/Private/SmartMeterScreen/SmartMeterScreen.js
View file @
fb137040
...
...
@@ -84,7 +84,19 @@ class SmartMeterScreen extends PureComponent {
const
{
data
}
=
this
.
state
;
return
!
error
?
(
<>
<
View
style
=
{[
theme
.
container
,
theme
.
containerWithPadding
]}
>
<
Text
style
=
{[
theme
.
smallTitle
,
theme
.
textDark
,
{
marginBottom
:
10
}]}
>
Smart
Device
<
/Text
>
<
SearchBar
containerStyle
=
{
styles
.
searchBarContainer
}
inputContainerStyle
=
{
styles
.
searchBarInputContainer
}
inputStyle
=
{
theme
.
normalText
}
lightTheme
placeholder
=
"Search..."
onChangeText
=
{
text
=>
this
.
updateSearch
(
text
)}
value
=
{
this
.
state
.
search
}
/
>
<
FlatList
refreshControl
=
{
<
RefreshControl
...
...
@@ -96,8 +108,7 @@ class SmartMeterScreen extends PureComponent {
colors
=
{[
color
.
primary
]}
/
>
}
style
=
{[
theme
.
container
]}
contentContainerStyle
=
{[
theme
.
containerWithPadding
,
{
paddingBottom
:
isIphoneX
()
?
90
:
55
}]}
//iPhoneX BottomSpace = 34
contentContainerStyle
=
{{
paddingBottom
:
isIphoneX
()
?
90
:
55
}}
//iPhoneX BottomSpace = 34
data
=
{
data
}
extraData
=
{
this
.
props
||
this
.
state
}
keyExtractor
=
{(
item
,
index
)
=>
item
.
deviceId
}
...
...
@@ -109,24 +120,9 @@ class SmartMeterScreen extends PureComponent {
<
/Text
>
<
/View
>
)}
ListHeaderComponent
=
{()
=>
(
<>
<
Text
style
=
{[
theme
.
smallTitle
,
theme
.
textDark
,
{
marginBottom
:
10
}]}
>
Smart
Device
<
/Text
>
<
SearchBar
containerStyle
=
{
styles
.
searchBarContainer
}
inputContainerStyle
=
{
styles
.
searchBarInputContainer
}
inputStyle
=
{
theme
.
normalText
}
lightTheme
placeholder
=
"Search..."
onChangeText
=
{
text
=>
this
.
updateSearch
(
text
)}
value
=
{
this
.
state
.
search
}
/
>
<
/
>
)}
renderItem
=
{(
item
,
index
)
=>
this
.
renderItem
(
item
)}
/
>
<
/
>
<
/
View
>
)
:
(
<
View
>
<
Text
>
{
'Something went wrong '
+
error
}
<
/Text
>
...
...
@@ -137,8 +133,6 @@ class SmartMeterScreen extends PureComponent {
const
styles
=
StyleSheet
.
create
({
searchBarContainer
:
{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'transparent'
,
height
:
35
,
padding
:
0
,
...
...
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