Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
Drip
Commits
cc9746a0
Commit
cc9746a0
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Remove cycleDay from state
parent
d93164ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bleeding.js
+6
-7
6 additions, 7 deletions
bleeding.js
temperature.js
+6
-7
6 additions, 7 deletions
temperature.js
with
12 additions
and
14 deletions
bleeding.js
+
6
−
7
View file @
cc9746a0
...
...
@@ -15,22 +15,21 @@ import getCycleDay from './get-cycle-day'
export
default
class
Bleeding
extends
Component
{
constructor
(
props
)
{
super
(
props
)
const
cycleDay
=
props
.
navigation
.
state
.
params
.
cycleDay
let
bleedingValue
=
cycleDay
.
bleeding
&&
cycleDay
.
bleeding
.
value
this
.
cycleDay
=
props
.
navigation
.
state
.
params
.
cycleDay
let
bleedingValue
=
this
.
cycleDay
.
bleeding
&&
this
.
cycleDay
.
bleeding
.
value
if
(
!
(
typeof
bleedingValue
===
'
number
'
)
){
bleedingValue
=
-
1
}
this
.
state
=
{
cycleDay
,
currentValue
:
bleedingValue
,
exclude
:
cycleDay
.
bleeding
?
cycleDay
.
bleeding
.
exclude
:
false
exclude
:
this
.
cycleDay
.
bleeding
?
this
.
cycleDay
.
bleeding
.
exclude
:
false
}
}
// TODO display cycle day
render
()
{
const
navigate
=
this
.
props
.
navigation
.
navigate
const
day
=
this
.
state
.
cycleDay
const
day
=
this
.
cycleDay
const
bleedingRadioProps
=
[
{
label
:
labels
[
0
],
value
:
0
},
{
label
:
labels
[
1
],
value
:
1
},
...
...
@@ -48,13 +47,13 @@ export default class Bleeding extends Component {
formHorizontal
=
{
true
}
labelHorizontal
=
{
false
}
onPress
=
{(
itemValue
)
=>
{
this
.
setState
({
currentValue
:
itemValue
})
this
.
setState
({
currentValue
:
itemValue
})
}}
/
>
<
Text
>
Exclude
<
/Text
>
<
Switch
onValueChange
=
{(
val
)
=>
{
this
.
setState
({
exclude
:
val
})
this
.
setState
({
exclude
:
val
})
}}
value
=
{
this
.
state
.
exclude
}
/
>
<
Button
...
...
This diff is collapsed.
Click to expand it.
temperature.js
+
6
−
7
View file @
cc9746a0
...
...
@@ -15,26 +15,25 @@ import getCycleDay from './get-cycle-day'
export
default
class
Temp
extends
Component
{
constructor
(
props
)
{
super
(
props
)
const
cycleDay
=
props
.
navigation
.
state
.
params
.
cycleDay
this
.
cycleDay
=
props
.
navigation
.
state
.
params
.
cycleDay
let
initialValue
if
(
cycleDay
.
temperature
)
{
initialValue
=
cycleDay
.
temperature
.
value
.
toString
()
if
(
this
.
cycleDay
.
temperature
)
{
initialValue
=
this
.
cycleDay
.
temperature
.
value
.
toString
()
}
else
{
const
prevTemp
=
getPreviousTemperature
(
cycleDay
)
const
prevTemp
=
getPreviousTemperature
(
this
.
cycleDay
)
initialValue
=
prevTemp
?
prevTemp
.
toString
()
:
''
}
this
.
state
=
{
cycleDay
,
currentValue
:
initialValue
,
exclude
:
cycleDay
.
temperature
?
cycleDay
.
temperature
.
exclude
:
false
exclude
:
this
.
cycleDay
.
temperature
?
this
.
cycleDay
.
temperature
.
exclude
:
false
}
}
render
()
{
const
navigate
=
this
.
props
.
navigation
.
navigate
const
cycleDay
=
this
.
state
.
cycleDay
const
cycleDay
=
this
.
cycleDay
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
style
=
{
styles
.
welcome
}
>
{
formatDateForViewHeader
(
cycleDay
.
date
)}
<
/Text
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment