diff --git a/components/calendar.js b/components/calendar.js index 3ab41df..80ac49f 100644 --- a/components/calendar.js +++ b/components/calendar.js @@ -14,13 +14,13 @@ import { calendarTheme, predictionToCalFormat, toCalFormat, - todayToCalFormat + todayToCalFormat, } from './helpers/calendar' class CalendarView extends Component { static propTypes = { setDate: PropTypes.func.isRequired, - navigate: PropTypes.func.isRequired + navigate: PropTypes.func.isRequired, } constructor(props) { @@ -30,7 +30,7 @@ class CalendarView extends Component { this.state = { bleedingDaysInCalFormat: toCalFormat(this.bleedingDays), predictedBleedingDaysInCalFormat: predictionToCalFormat(predictedMenses), - todayInCalFormat: todayToCalFormat() + todayInCalFormat: todayToCalFormat(), } this.bleedingDays.addListener(this.setStateWithCalFormattedDays) @@ -42,7 +42,7 @@ class CalendarView extends Component { this.setState({ bleedingDaysInCalFormat: toCalFormat(this.bleedingDays), predictedBleedingDaysInCalFormat: predictionToCalFormat(predictedMenses), - todayInCalFormat: todayToCalFormat() + todayInCalFormat: todayToCalFormat(), }) } @@ -59,7 +59,7 @@ class CalendarView extends Component { const { todayInCalFormat, bleedingDaysInCalFormat, - predictedBleedingDaysInCalFormat + predictedBleedingDaysInCalFormat, } = this.state const markedDates = Object.assign( {}, @@ -75,7 +75,7 @@ class CalendarView extends Component { firstDay={1} onDayPress={this.passDateToDayView.bind(this)} markedDates={markedDates} - markingType={'custom'} + markingType='custom' theme={calendarTheme} // Max amount of months allowed to scroll to the past. pastScrollRange={120} @@ -86,17 +86,14 @@ class CalendarView extends Component { } const styles = StyleSheet.create({ - container: { flex: 1 } + container: { flex: 1 }, }) const mapDispatchToProps = (dispatch) => { - return({ + return { setDate: (date) => dispatch(setDate(date)), navigate: (page) => dispatch(navigate(page)), - }) + } } -export default connect( - null, - mapDispatchToProps, -)(CalendarView) +export default connect(null, mapDispatchToProps)(CalendarView) diff --git a/components/chart/chart.js b/components/chart/chart.js index 021f492..0dc364e 100644 --- a/components/chart/chart.js +++ b/components/chart/chart.js @@ -229,7 +229,7 @@ const styles = StyleSheet.create({ }, loadingContainer: { height: '100%', - backgroundColor: Colors.tourquiseLight, + backgroundColor: Colors.turquoiseLight, justifyContent: 'center' }, page: { diff --git a/components/chart/dot-and-line.js b/components/chart/dot-and-line.js index e3be7aa..d2618c3 100644 --- a/components/chart/dot-and-line.js +++ b/components/chart/dot-and-line.js @@ -54,11 +54,11 @@ export default class DotAndLine extends Component { const dot = new Path().moveTo(CHART_COLUMN_MIDDLE , y - CHART_DOT_RADIUS) .arc(0, CHART_DOT_RADIUS * 2, CHART_DOT_RADIUS) .arc(0, CHART_DOT_RADIUS * -2, CHART_DOT_RADIUS) - const dotColor = exclude ? Colors.tourquise : Colors.tourquiseDark + const dotColor = exclude ? Colors.turquoise : Colors.turquoiseDark const lineColorLeft = excludeLeftLine ? - Colors.tourquise : Colors.tourquiseDark + Colors.turquoise : Colors.turquoiseDark const lineColorRight = excludeRightLine ? - Colors.tourquise : Colors.tourquiseDark + Colors.turquoise : Colors.turquoiseDark return( diff --git a/components/common/app-page.js b/components/common/app-page.js index 6181700..0ffde8d 100644 --- a/components/common/app-page.js +++ b/components/common/app-page.js @@ -36,11 +36,11 @@ AppPage.propTypes = { const styles = StyleSheet.create({ container: { - backgroundColor: Colors.tourquiseLight, + backgroundColor: Colors.turquoiseLight, flex: 1 }, scrollView: { - backgroundColor: Colors.tourquiseLight, + backgroundColor: Colors.turquoiseLight, flexGrow: 1 }, title: { diff --git a/components/header/logo.js b/components/header/logo.js index 4bd63fe..da2759b 100644 --- a/components/header/logo.js +++ b/components/header/logo.js @@ -23,7 +23,7 @@ Logo.propTypes = { const styles = StyleSheet.create({ logo: { - color: Colors.tourquiseDark, + color: Colors.turquoiseDark, fontFamily: Fonts.bold, fontSize: Sizes.title } diff --git a/components/helpers/calendar.js b/components/helpers/calendar.js index e765dd9..fdedfa8 100644 --- a/components/helpers/calendar.js +++ b/components/helpers/calendar.js @@ -12,11 +12,13 @@ export const toCalFormat = (bleedingDaysSortedByDate) => { customStyles: { container: { backgroundColor: shades[day.bleeding.value], - } - } - } - if (day.date === todayDateString) { - acc[day.date].customStyles.text = styles.calendarToday + paddingTop: 2, + }, + text: { + color: Colors.turquoiseLight, + ...(day.date === todayDateString && styles.calendarToday), + }, + }, } return acc }, {}) @@ -31,12 +33,11 @@ export const predictionToCalFormat = (predictedDays) => { accSet[day] = { customStyles: { container: { - borderColor: (i === middleIndex) ? shades[3] : shades[0], - borderStyle: (i === middleIndex) ? 'solid' : 'dashed', + borderColor: i === middleIndex ? shades[3] : shades[0], + borderStyle: i === middleIndex ? 'solid' : 'dashed', borderWidth: 1, }, - - } + }, } if (day === todayDateString) { accSet[day].customStyles.text = styles.calendarToday @@ -50,24 +51,24 @@ export const predictionToCalFormat = (predictedDays) => { export const todayToCalFormat = () => { const todayDateString = LocalDate.now().toString() - const todayFormated = {} - todayFormated[todayDateString] = { - customStyles: { - text: styles.calendarToday - } + return { + [todayDateString]: { + customStyles: { + text: styles.calendarToday, + }, + }, } - return todayFormated } const styles = { calendarToday: { fontFamily: Fonts.bold, - color: Colors.purple + color: Colors.purple, }, } export const calendarTheme = { - calendarBackground: Colors.tourquiseLight, + calendarBackground: Colors.turquoiseLight, dayTextColor: Colors.greyDark, monthTextColor: Colors.purple, textDayFontFamily: Fonts.main, diff --git a/components/home.js b/components/home.js index ad2ff53..423d82a 100644 --- a/components/home.js +++ b/components/home.js @@ -77,21 +77,21 @@ class Home extends Component { {cycleDayNumber && {cycleDayText} - {labels.cycleDay} + {labels.cycleDay} } {phase && {phaseText} - + {labels.cyclePhase} - {status} + {status} } - {prediction} + {prediction}