1.3.7-4 - Prod Build - Updated sentry logging.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import * as Analytics from "expo-firebase-analytics";
|
||||
import { signInWithEmailAndPassword, signOut } from "firebase/auth";
|
||||
import { all, call, put, takeLatest } from "redux-saga/effects";
|
||||
import * as Sentry from "sentry-expo";
|
||||
import { logImEXEvent } from "../../firebase/firebase.analytics";
|
||||
import {
|
||||
auth,
|
||||
getCurrentUser,
|
||||
updateCurrentUser,
|
||||
} from "../../firebase/firebase.utils";
|
||||
import { logImEXEvent } from "../../firebase/firebase.analytics";
|
||||
import { QUERY_BODYSHOP } from "../../graphql/bodyshop.queries";
|
||||
import { client } from "../../graphql/client";
|
||||
import {
|
||||
@@ -22,7 +24,6 @@ import {
|
||||
validatePasswordResetSuccess,
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
import { signInWithEmailAndPassword, signOut } from "firebase/auth";
|
||||
|
||||
export function* onEmailSignInStart() {
|
||||
yield takeLatest(UserActionTypes.EMAIL_SIGN_IN_START, signInWithEmail);
|
||||
@@ -42,6 +43,7 @@ export function* signInWithEmail({ payload: { email, password } }) {
|
||||
);
|
||||
} catch (error) {
|
||||
yield put(signInFailure(error));
|
||||
|
||||
//logImEXEvent("redux_sign_in_failure", { user: email, error });
|
||||
}
|
||||
}
|
||||
@@ -106,6 +108,7 @@ export function* onSignInSuccess() {
|
||||
export function* signInSuccessSaga({ payload }) {
|
||||
try {
|
||||
Analytics.setUserId(payload.email);
|
||||
Sentry.Native.setUser({ email: payload.email });
|
||||
|
||||
const shop = yield client.query({ query: QUERY_BODYSHOP });
|
||||
logImEXEvent("imexmobile_sign_in_success", payload);
|
||||
@@ -119,6 +122,7 @@ export function* signInSuccessSaga({ payload }) {
|
||||
// );
|
||||
} catch (error) {
|
||||
console.log("UH-OH. Couldn't get shop details.", error);
|
||||
Sentry.Native.captureException(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user