Permalink
Browse files

Almost here

  • Loading branch information...
jeremybarbet committed Jan 11, 2018
1 parent 8d8839e commit 3052c683ba93a5cb7f3e7f3ec1443471d8d7b871
Showing with 27 additions and 22 deletions.
  1. +1 −1 .env_example
  2. +0 −2 .gitignore
  3. +5 −0 android/sentry.properties
  4. +5 −0 ios/sentry.properties
  5. +1 −1 ios/statiks/Info.plist
  6. +5 −13 src/components/Placeholders.js
  7. +2 −4 src/index.js
  8. +8 −1 src/screens/list/List.js
@@ -1,6 +1,6 @@
SENTRY_DSN=
SENTRY_PROJECT=
SENTRY_ORG=
SENTRY_PROJECT=
SENTRY_AUTH_TOKEN=
ANDROID_KEYSTORE_ALIAS=
@@ -44,8 +44,6 @@ buck-out/
# Projects
src/assets/fonts
android/app/*.jks
android/sentry.properties
ios/sentry.properties
.env
# fastlane
@@ -0,0 +1,5 @@
defaults.url=https://sentry.io/
defaults.org=project.env.get("SENTRY_ORG")
defaults.project=project.env.get("SENTRY_PROJECT")
auth.token=project.env.get("SENTRY_AUTH_TOKEN")
cli.executable=node_modules/@sentry/cli/bin/sentry-cli
@@ -0,0 +1,5 @@
defaults.url=https://sentry.io/
defaults.org=project.env.get("SENTRY_ORG")
defaults.project=project.env.get("SENTRY_PROJECT")
auth.token=project.env.get("SENTRY_AUTH_TOKEN")
cli.executable=node_modules/@sentry/cli/bin/sentry-cli
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>111</string>
<string>115</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
@@ -1,32 +1,24 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, Dimensions, View, Text, Image, TouchableOpacity, Linking } from 'react-native';
import { Sentry, SentrySeverity } from 'react-native-sentry';
import { navigatorTypes } from 'utils/types';
import { v, fonts } from 'Theme';
import { SETTINGS } from '../screens';
const { width } = Dimensions.get('window');
class Empty extends PureComponent {
static propTypes = {
...navigatorTypes,
onPress: PropTypes.func,
}
handlePress = () => {
// Sentry.nativeCrash();
// Promise.reject('Boom promise');
throw new Error('handlePress Error');
this.props.navigator.push({ screen: SETTINGS });
}
render() {
const { onPress } = this.props;
return (
<View style={s.container}>
<Image
@@ -55,7 +47,7 @@ class Empty extends PureComponent {
}
}
class Error extends PureComponent {
class Critical extends PureComponent {
render() {
return (
@@ -194,6 +186,6 @@ const s = StyleSheet.create({
export {
Empty,
Error,
Critical,
Loading,
};
@@ -1,14 +1,12 @@
import { Navigation } from 'react-native-navigation';
import { Sentry, SentryLog } from 'react-native-sentry';
import { Sentry } from 'react-native-sentry';
import config from 'react-native-config';
import { Screens, startApp } from 'screens';
import Store, { StoreProvider } from 'store';
if (!__DEV__) {
Sentry.config(config.SENTRY_DSN, {
logLevel: SentryLog.Verbose,
}).install();
Sentry.config(config.SENTRY_DSN).install();
}
const store = new Store();
@@ -5,6 +5,7 @@ import { observable, toJS } from 'mobx';
import { navigatorTypes } from 'utils/types';
import { v } from 'Theme';
import { SETTINGS } from 'screens';
import { Empty } from 'components/Placeholders';
import Header from 'components/Header';
@@ -67,12 +68,18 @@ export default class List extends Component {
this.state.pan.x.removeAllListeners();
}
handleClick() {
this.props.navigator.push({ screen: SETTINGS });
}
render() {
const { navigator, stats } = this.props;
const { data } = stats;
const parsed = toJS(data);
if (data.size <= 0) return <Empty navigator={navigator} />;
if (data.size <= 0) {
return <Empty onPress={this.handleClick} />;
}
return (
<View style={{ flex: 1 }}>

0 comments on commit 3052c68

Please sign in to comment.