This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import firebase from 'firebase'; | |
import cfg from '../cfg'; | |
import { GET_CONTRIBUTIONS } from './types'; | |
const firebaseTimeline = firebase.initializeApp(cfg, 'firebaseTimeline'); | |
export const getContributions = (location) => { | |
return (dispatch) => { | |
firebaseTimeline.database().ref(`/prod/city-occurrences/${location}`) | |
.on('value', citySnap => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setting a timer for a long period of time, i.e. multiple minutes, | |
is a performance and correctness issue on Android as it keeps the | |
timer module awake, and timers can only be called when the app is | |
in the foreground. See https://github.com/facebook/react-native/issues/12981 | |
for more info. | |
(Saw setTimeout with duration 507914ms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Text } from 'native-base'; | |
import { StackNavigator, TabNavigator, TabBarTop } from 'react-navigation'; | |
import Login from '../components/Login.component'; | |
import WorkList from '../components/WorkList.component'; | |
import TaskList from '../components/TaskList.component'; | |
import Timer from '../components/Timer.component'; | |
const tabs = TabNavigator({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Home.js | |
<Tab heading="TAREFAS" | |
tabStyle={{ backgroundColor: BLUE }} | |
textStyle={{ color: WHITE }} | |
activeTabStyle={{ backgroundColor: BLUE }} | |
activeTextStyle={{ color: WHITE, fontWeight: '900' }} | |
> | |
<TaskList navigate={this.props.navigation.navigate} /> | |
</Tab> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`ScrollView` has no propType for native prop `RCTScrollView.contentInsetAdjustmentBehavior` of native type `UIScrollViewContentInsetAdjustmentBehavior` | |
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away. | |
verifyPropTypes | |
verifyPropTypes.js:67:22 | |
requireNativeComponent | |
requireNativeComponent.js:108:6 | |
<unknown> | |
ScrollView.js:835:4 | |
loadModuleImplementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getList = (employeeUID) => { | |
let result = {}; | |
const ref = database.ref('employee_works').child(employeeUID).orderByValue().equalTo(true); | |
return new Promise((resolve, reject) => { | |
ref.once('value') | |
.then(workUIDs => { | |
if (workUIDs.val()) { | |
Object.keys(workUIDs.val()).map(item => { | |
database.ref('works').child(item).once('value') | |
.then(workDetails => result[item] = workDetails.val()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import { BrowserRouter as Router, Switch, Route, Redirect } from 'react-router-dom'; | |
import { auth } from '../services/firebase'; | |
import { | |
Login, | |
Home, | |
E404, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select | |
value={this.state.customer ? this.state.customer : 'Selecione...'} | |
onChange={e => this._handleSelect(e)} | |
> | |
{_.map(this.state.customerOptions, item => { | |
return ( | |
<option key={item.uid} value={item.uid}> {item.company ? item.company : item.name} </option> | |
) | |
})} | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Router> | |
<Switch> | |
<Route exact path='/' component={Login} /> | |
<Home> | |
<Switch> | |
<Route exact path="/dashboard" component={Dashboard} /> | |
<Route exact path="/tarefas" component={Tasks} /> | |
<Route exact path="/usuarios" component={Users} /> | |
<Route exact path="/perfil/:uid" component={Profile} /> |