Skip to content

Commit

Permalink
print width 100
Browse files Browse the repository at this point in the history
  • Loading branch information
jozan committed Sep 9, 2018
1 parent dbb1f11 commit b1de4eb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.json
@@ -1,5 +1,5 @@
{
"printWidth": 80,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5"
}
26 changes: 5 additions & 21 deletions example/index.js
@@ -1,18 +1,7 @@
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Alert,
Button,
} from 'react-native';

import {
GoogleSignin,
GoogleSigninButton,
statusCodes,
} from 'react-native-google-signin';
import { AppRegistry, StyleSheet, Text, View, Alert, Button } from 'react-native';

import { GoogleSignin, GoogleSigninButton, statusCodes } from 'react-native-google-signin';
import config from './config';

class GoogleSigninSampleApp extends Component {
Expand Down Expand Up @@ -42,9 +31,7 @@ class GoogleSigninSampleApp extends Component {
this.setState({ userInfo, error: null });
} catch (error) {
const errorMessage =
error.code === statusCodes.SIGN_IN_REQUIRED
? 'Please sign in :)'
: error.message;
error.code === statusCodes.SIGN_IN_REQUIRED ? 'Please sign in :)' : error.message;
this.setState({
error: errorMessage,
});
Expand Down Expand Up @@ -169,7 +156,4 @@ const styles = StyleSheet.create({
},
});

AppRegistry.registerComponent(
'GoogleSigninSampleApp',
() => GoogleSigninSampleApp
);
AppRegistry.registerComponent('GoogleSigninSampleApp', () => GoogleSigninSampleApp);
8 changes: 2 additions & 6 deletions src/GoogleSignin.js
Expand Up @@ -30,17 +30,13 @@ class GoogleSignin {
'RNGoogleSignin: Missing property `showPlayServicesUpdateDialog` in options object for `hasPlayServices`'
);
}
return RNGoogleSignin.playServicesAvailable(
options.showPlayServicesUpdateDialog
);
return RNGoogleSignin.playServicesAvailable(options.showPlayServicesUpdateDialog);
}
}

configure(options = {}) {
if (options.offlineAccess && !options.webClientId) {
throw new Error(
'RNGoogleSignin: offline use requires server web ClientID'
);
throw new Error('RNGoogleSignin: offline use requires server web ClientID');
}

this.configPromise = RNGoogleSignin.configure(options);
Expand Down
21 changes: 5 additions & 16 deletions src/GoogleSigninButton.android.js
Expand Up @@ -11,10 +11,7 @@ import {

const { RNGoogleSignin } = NativeModules;

const RNGoogleSigninButton = requireNativeComponent(
'RNGoogleSigninButton',
null
);
const RNGoogleSigninButton = requireNativeComponent('RNGoogleSigninButton', null);

export class GoogleSigninButton extends Component {
static propTypes = {
Expand All @@ -25,12 +22,9 @@ export class GoogleSigninButton extends Component {
};

componentDidMount() {
this._clickListener = DeviceEventEmitter.addListener(
'RNGoogleSigninButtonClicked',
() => {
this.props.onPress && this.props.onPress();
}
);
this._clickListener = DeviceEventEmitter.addListener('RNGoogleSigninButtonClicked', () => {
this.props.onPress && this.props.onPress();
});
}

componentWillUnmount() {
Expand All @@ -40,12 +34,7 @@ export class GoogleSigninButton extends Component {
render() {
const { style, ...props } = this.props;

return (
<RNGoogleSigninButton
style={[{ backgroundColor: 'transparent' }, style]}
{...props}
/>
);
return <RNGoogleSigninButton style={[{ backgroundColor: 'transparent' }, style]} {...props} />;
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/GoogleSigninButton.ios.js
Expand Up @@ -10,10 +10,7 @@ import {
} from 'react-native';

const { RNGoogleSignin } = NativeModules;
const RNGoogleSigninButton = requireNativeComponent(
'RNGoogleSigninButton',
null
);
const RNGoogleSigninButton = requireNativeComponent('RNGoogleSigninButton', null);

export class GoogleSigninButton extends Component {
static propTypes = {
Expand Down

0 comments on commit b1de4eb

Please sign in to comment.