Added logrocket dependencies.
This commit is contained in:
@@ -14,6 +14,10 @@ import GlobalLoadingBar from "../components/global-loading-bar/global-loading-ba
|
||||
import { auth } from "../firebase/firebase.utils";
|
||||
import errorLink from "../graphql/apollo-error-handling";
|
||||
import App from "./App";
|
||||
|
||||
import LogRocket from 'logrocket';
|
||||
LogRocket.init('gvfvfw/bodyshopapp');
|
||||
|
||||
export default class AppContainer extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import i18next from "i18next";
|
||||
import React, { lazy, Suspense, useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -37,11 +36,6 @@ export default connect(
|
||||
}, [checkUserSession]);
|
||||
|
||||
const { t } = useTranslation();
|
||||
if (currentUser && currentUser.language)
|
||||
i18next.changeLanguage(currentUser.language, err => {
|
||||
if (err)
|
||||
return console.log("Error encountered when changing languages.", err);
|
||||
});
|
||||
|
||||
if (currentUser.authorized === null) {
|
||||
return <LoadingSpinner message={t("general.labels.loggingin")} />;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { all, call, put, takeLatest } from "redux-saga/effects";
|
||||
import LogRocket from "logrocket";
|
||||
import {
|
||||
auth,
|
||||
getCurrentUser,
|
||||
updateCurrentUser
|
||||
updateCurrentUser,
|
||||
} from "../../firebase/firebase.utils";
|
||||
import {
|
||||
signInFailure,
|
||||
@@ -10,7 +11,7 @@ import {
|
||||
signOutFailure,
|
||||
signOutSuccess,
|
||||
unauthorizedUser,
|
||||
updateUserDetailsSuccess
|
||||
updateUserDetailsSuccess,
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
|
||||
@@ -23,7 +24,7 @@ export function* signInWithEmail({ payload: { email, password } }) {
|
||||
email: user.email,
|
||||
displayName: user.displayName,
|
||||
photoURL: user.photoURL,
|
||||
authorized: true
|
||||
authorized: true,
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
@@ -42,13 +43,14 @@ export function* isUserAuthenticated() {
|
||||
yield put(unauthorizedUser());
|
||||
return;
|
||||
}
|
||||
LogRocket.identify(user.email);
|
||||
yield put(
|
||||
signInSuccess({
|
||||
uid: user.uid,
|
||||
email: user.email,
|
||||
displayName: user.displayName,
|
||||
photoURL: user.photoURL,
|
||||
authorized: true
|
||||
authorized: true,
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
@@ -92,6 +94,6 @@ export function* userSagas() {
|
||||
call(onEmailSignInStart),
|
||||
call(onCheckUserSession),
|
||||
call(onSignOutStart),
|
||||
call(onUpdateUserDetails)
|
||||
call(onUpdateUserDetails),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user