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
96d24597
Commit
96d24597
authored
6 years ago
by
mashazyu
Browse files
Options
Downloads
Patches
Plain Diff
Changes header of today's cycle day overview page
parent
9131c7a6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/header/cycle-day.js
+9
-2
9 additions, 2 deletions
components/header/cycle-day.js
with
9 additions
and
2 deletions
components/header/cycle-day.js
+
9
−
2
View file @
96d24597
...
@@ -2,11 +2,18 @@ import React from 'react'
...
@@ -2,11 +2,18 @@ import React from 'react'
import
{
import
{
View
,
View
,
Text
}
from
'
react-native
'
Text
}
from
'
react-native
'
import
{
LocalDate
}
from
'
js-joda
'
import
moment
from
'
moment
'
import
moment
from
'
moment
'
import
styles
from
'
../../styles
'
import
styles
from
'
../../styles
'
import
NavigationArrow
from
'
./navigation-arrow
'
import
NavigationArrow
from
'
./navigation-arrow
'
export
default
function
CycleDayHeader
(
props
)
{
const
FormattedDate
=
({
date
})
=>
{
const
today
=
LocalDate
.
now
()
const
dateToDisplay
=
LocalDate
.
parse
(
date
)
return
today
.
equals
(
dateToDisplay
)
?
'
today
'
:
moment
(
date
).
format
(
'
MMMM Do YYYY
'
)
}
export
default
function
CycleDayHeader
({
date
,
...
props
})
{
return
(
<
View
style
=
{[
styles
.
header
,
styles
.
headerCycleDay
]}
>
return
(
<
View
style
=
{[
styles
.
header
,
styles
.
headerCycleDay
]}
>
<
View
<
View
style
=
{
styles
.
accentCircle
}
style
=
{
styles
.
accentCircle
}
...
@@ -15,7 +22,7 @@ export default function CycleDayHeader(props) {
...
@@ -15,7 +22,7 @@ export default function CycleDayHeader(props) {
<
NavigationArrow
direction
=
'
left
'
{...
props
}
/
>
<
NavigationArrow
direction
=
'
left
'
{...
props
}
/
>
<
View
>
<
View
>
<
Text
style
=
{
styles
.
dateHeader
}
>
<
Text
style
=
{
styles
.
dateHeader
}
>
{
moment
(
props
.
date
).
format
(
'
MMMM Do YYYY
'
)}
<
FormattedDate
date
=
{
date
}
/
>
<
/Text
>
<
/Text
>
{
props
.
cycleDayNumber
&&
{
props
.
cycleDayNumber
&&
<
Text
style
=
{
styles
.
cycleDayNumber
}
>
<
Text
style
=
{
styles
.
cycleDayNumber
}
>
...
...
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