2018-04-03 16:24:59 +00:00
|
|
|
import React from 'react';
|
2018-08-31 16:46:33 +00:00
|
|
|
import { Platform } from 'react-native';
|
2018-07-10 13:40:32 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2018-04-03 16:24:59 +00:00
|
|
|
import { Answers } from 'react-native-fabric';
|
2018-07-10 13:40:32 +00:00
|
|
|
import { NavigationActions } from '../Navigation';
|
2018-04-03 16:24:59 +00:00
|
|
|
|
2018-08-31 16:46:33 +00:00
|
|
|
const isAndroid = () => Platform.OS === 'android';
|
|
|
|
|
2018-07-10 13:40:32 +00:00
|
|
|
/** @extends React.Component */
|
2018-04-03 16:24:59 +00:00
|
|
|
export default class extends React.Component {
|
2018-08-31 16:46:33 +00:00
|
|
|
static navigatorStyle = {
|
|
|
|
navBarBackgroundColor: isAndroid() ? '#2F343D' : undefined,
|
|
|
|
navBarTextColor: isAndroid() ? '#FFF' : undefined,
|
|
|
|
navBarButtonColor: isAndroid() ? '#FFF' : undefined
|
|
|
|
}
|
2018-09-25 19:28:42 +00:00
|
|
|
|
2018-07-10 13:40:32 +00:00
|
|
|
static propTypes = {
|
|
|
|
navigator: PropTypes.object
|
|
|
|
}
|
2018-09-25 19:28:42 +00:00
|
|
|
|
2018-04-03 16:24:59 +00:00
|
|
|
constructor(name, props) {
|
|
|
|
super(props);
|
2018-07-10 13:40:32 +00:00
|
|
|
NavigationActions.setNavigator(props.navigator);
|
2018-04-03 16:24:59 +00:00
|
|
|
Answers.logContentView(name);
|
|
|
|
}
|
2018-09-25 19:28:42 +00:00
|
|
|
|
2018-04-24 19:34:03 +00:00
|
|
|
componentDidCatch = (error, info) => {
|
|
|
|
Answers.logCustom(error, info);
|
|
|
|
}
|
2018-04-03 16:24:59 +00:00
|
|
|
}
|