Skip to content
Snippets Groups Projects
Commit 04476769 authored by tina's avatar tina
Browse files

Merge branch 'master' into '129-extract-text-from-stats-and-layout'

# Conflicts:
#   components/labels.js
parents 392e09fb f1b010f1
No related branches found
No related tags found
No related merge requests found
Showing
with 42 additions and 18 deletions
......@@ -8,6 +8,7 @@
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
......
......@@ -77,6 +77,7 @@ project.ext.react = [
]
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
/**
* Set this to true to create two separate APKs instead of one:
......@@ -137,9 +138,11 @@ android {
}
dependencies {
compile project(':react-native-vector-icons')
compile project(':react-native-fs')
compile project(':react-native-document-picker')
compile project(':react-native-share')
compile project(':realm')
compile project(':react-native-svg')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
compile "com.facebook.react:react-native:+" // From node_modules
......
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
......@@ -3,10 +3,12 @@ package com.drip;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import com.rnfs.RNFSPackage;
import com.reactnativedocumentpicker.ReactNativeDocumentPicker;
import cl.json.RNSharePackage;
import cl.json.ShareApplication;
import io.realm.react.RealmReactPackage;
import com.horcrux.svg.SvgPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
......@@ -27,9 +29,11 @@ public class MainApplication extends Application implements ReactApplication, Sh
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage(),
new RNFSPackage(),
new ReactNativeDocumentPicker(),
new RNSharePackage(),
new RealmReactPackage(),
new SvgPackage()
new RealmReactPackage()
);
}
......
rootProject.name = 'drip'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
include ':react-native-document-picker'
project(':react-native-document-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-document-picker/android')
include ':react-native-share'
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
include ':realm'
project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android')
include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':app'
import { createStackNavigator } from 'react-navigation'
import { createStackNavigator, createBottomTabNavigator } from 'react-navigation'
import Home from './components/home'
import Calendar from './components/calendar'
......@@ -7,16 +7,28 @@ import Chart from './components/chart/chart'
import Settings from './components/settings'
import Stats from './components/stats'
import styles from './styles'
// this is until react native fixes this bugg, see
// https://github.com/facebook/react-native/issues/18868#issuecomment-382671739
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: createStackNavigator({Home, CycleDay}, {headerMode: 'none'}),
Calendar: createStackNavigator({Calendar, CycleDay}, {headerMode: 'none'}),
Chart: createStackNavigator({Chart, CycleDay}, {headerMode: 'none'}),
Settings: { screen: Settings },
Stats: { screen: Stats}
}
const config = {
labeled: true,
shifting: false,
tabBarOptions: {
style: {backgroundColor: '#ff7e5f'},
labelStyle: {fontSize: 15, color: 'white'}
},
}
export default createBottomTabNavigator(routes, config)
\ No newline at end of file
import React, { Component } from 'react'
import { View } from 'react-native'
import { Calendar } from 'react-native-calendars'
import { CalendarList } from 'react-native-calendars'
import * as styles from '../styles'
import { getOrCreateCycleDay, bleedingDaysSortedByDate } from '../db'
......@@ -29,13 +29,13 @@ export default class CalendarView extends Component {
passDateToDayView(result) {
const cycleDay = getOrCreateCycleDay(result.dateString)
const navigate = this.props.navigation.navigate
navigate('cycleDay', { cycleDay })
navigate('CycleDay', { cycleDay })
}
render() {
return (
<View style={styles.container}>
<Calendar
<CalendarList
onDayPress={ this.passDateToDayView.bind(this) }
markedDates = { this.state.bleedingDaysInCalFormat }
markingType = {'period'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment