- Linting... Prettier...
This commit is contained in:
@@ -6,36 +6,33 @@ import { LoginButton } from 'react-native-fbsdk';
|
||||
import { PERMISSIONS } from '../../constants/constants.js';
|
||||
|
||||
export default function FacebookLogin({
|
||||
doCancelAction,
|
||||
doErrorAction,
|
||||
doLogoutAction,
|
||||
doSuccessAction,
|
||||
doCancelAction,
|
||||
doErrorAction,
|
||||
doLogoutAction,
|
||||
doSuccessAction,
|
||||
}) {
|
||||
|
||||
return (
|
||||
<View>
|
||||
<LoginButton
|
||||
publishPermissions={PERMISSIONS.FACEBOOK}
|
||||
onLoginFinished={
|
||||
(error, result) => {
|
||||
if (error) {
|
||||
doErrorAction(error);
|
||||
} else if (result.isCancelled) {
|
||||
doCancelAction();
|
||||
} else {
|
||||
doSuccessAction(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
onLogoutFinished={doLogoutAction}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
return (
|
||||
<View>
|
||||
<LoginButton
|
||||
publishPermissions={PERMISSIONS.FACEBOOK}
|
||||
onLoginFinished={(error, result) => {
|
||||
if (error) {
|
||||
doErrorAction(error);
|
||||
} else if (result.isCancelled) {
|
||||
doCancelAction();
|
||||
} else {
|
||||
doSuccessAction(result);
|
||||
}
|
||||
}}
|
||||
onLogoutFinished={doLogoutAction}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
FacebookLogin.propTypes = {
|
||||
doCancelAction: PropTypes.func.isRequired,
|
||||
doErrorAction: PropTypes.func.isRequired,
|
||||
doLogoutAction: PropTypes.func.isRequired,
|
||||
doSuccessAction: PropTypes.func.isRequired,
|
||||
doCancelAction: PropTypes.func.isRequired,
|
||||
doErrorAction: PropTypes.func.isRequired,
|
||||
doLogoutAction: PropTypes.func.isRequired,
|
||||
doSuccessAction: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user