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
5136b9f8
Commit
5136b9f8
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Introduce bottom menu
parent
0879d4ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app.js
+16
-9
16 additions, 9 deletions
app.js
components/calendar.js
+1
-1
1 addition, 1 deletion
components/calendar.js
components/home.js
+1
-26
1 addition, 26 deletions
components/home.js
with
18 additions
and
36 deletions
app.js
+
16
−
9
View file @
5136b9f8
import
{
createStackNavigator
}
from
'
react-navigation
'
import
{
createStackNavigator
,
createBottomTabNavigator
}
from
'
react-navigation
'
import
Home
from
'
./components/home
'
import
Calendar
from
'
./components/calendar
'
...
...
@@ -12,11 +12,18 @@ import Stats from './components/stats'
import
{
YellowBox
}
from
'
react-native
'
YellowBox
.
ignoreWarnings
([
'
Warning: isMounted(...) is deprecated
'
])
export
default
createStackNavigator
({
home
:
{
screen
:
Home
},
calendar
:
{
screen
:
Calendar
},
cycleDay
:
{
screen
:
CycleDay
},
chart
:
{
screen
:
Chart
},
settings
:
{
screen
:
Settings
},
stats
:
{
screen
:
Stats
}
})
const
routes
=
{
Home
:
{
screen
:
Home
},
Calendar
:
createStackNavigator
({
Calendar
,
CycleDay
}),
Chart
:
createStackNavigator
({
Chart
,
CycleDay
}),
Settings
:
{
screen
:
Settings
},
Stats
:
{
screen
:
Stats
}
}
const
config
=
{
labeled
:
true
,
shifting
:
false
,
backBehavior
:
'
none
'
}
export
default
createBottomTabNavigator
(
routes
,
config
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
components/calendar.js
+
1
−
1
View file @
5136b9f8
...
...
@@ -29,7 +29,7 @@ export default class CalendarView extends Component {
passDateToDayView
(
result
)
{
const
cycleDay
=
getOrCreateCycleDay
(
result
.
dateString
)
const
navigate
=
this
.
props
.
navigation
.
navigate
navigate
(
'
c
ycleDay
'
,
{
cycleDay
})
navigate
(
'
C
ycleDay
'
,
{
cycleDay
})
}
render
()
{
...
...
This diff is collapsed.
Click to expand it.
components/home.js
+
1
−
26
View file @
5136b9f8
...
...
@@ -42,11 +42,10 @@ export default class Home extends Component {
const
todayDateString
=
LocalDate
.
now
().
toString
()
const
cycleDay
=
getOrCreateCycleDay
(
todayDateString
)
const
navigate
=
this
.
props
.
navigation
.
navigate
navigate
(
'
c
ycleDay
'
,
{
cycleDay
})
navigate
(
'
C
ycleDay
'
,
{
cycleDay
})
}
render
()
{
const
navigate
=
this
.
props
.
navigation
.
navigate
return
(
<
ScrollView
>
<
Text
style
=
{
styles
.
welcome
}
>
{
this
.
state
.
welcomeText
}
<
/Text
>
...
...
@@ -57,24 +56,6 @@ export default class Home extends Component {
title
=
"
Edit symptoms for today
"
>
<
/Button
>
<
/View
>
<
View
style
=
{
styles
.
homeButton
}
>
<
Button
onPress
=
{()
=>
navigate
(
'
calendar
'
)}
title
=
"
Go to calendar
"
>
<
/Button
>
<
/View
>
<
View
style
=
{
styles
.
homeButton
}
>
<
Button
onPress
=
{()
=>
navigate
(
'
chart
'
)}
title
=
"
Go to chart
"
>
<
/Button
>
<
/View
>
<
View
style
=
{
styles
.
homeButton
}
>
<
Button
onPress
=
{()
=>
navigate
(
'
settings
'
)}
title
=
"
Go to settings
"
>
<
/Button
>
<
/View
>
<
View
style
=
{
styles
.
homeButton
}
>
<
Button
onPress
=
{()
=>
fillWithDummyData
()}
...
...
@@ -87,12 +68,6 @@ export default class Home extends Component {
title
=
"
delete everything
"
>
<
/Button
>
<
/View
>
<
View
style
=
{
styles
.
homeButton
}
>
<
Button
onPress
=
{()
=>
navigate
(
'
stats
'
)}
title
=
"
Go to stats
"
>
<
/Button
>
<
/View
>
<
/View
>
<
/ScrollView
>
)
...
...
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