Added logrocket dependencies.
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
"graphql": "^15.0.0",
|
"graphql": "^15.0.0",
|
||||||
"i18next": "^19.4.3",
|
"i18next": "^19.4.3",
|
||||||
"i18next-browser-languagedetector": "^4.1.1",
|
"i18next-browser-languagedetector": "^4.1.1",
|
||||||
|
"logrocket": "^1.0.7",
|
||||||
"node-sass": "^4.13.1",
|
"node-sass": "^4.13.1",
|
||||||
"query-string": "^6.12.1",
|
"query-string": "^6.12.1",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ import GlobalLoadingBar from "../components/global-loading-bar/global-loading-ba
|
|||||||
import { auth } from "../firebase/firebase.utils";
|
import { auth } from "../firebase/firebase.utils";
|
||||||
import errorLink from "../graphql/apollo-error-handling";
|
import errorLink from "../graphql/apollo-error-handling";
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
|
|
||||||
|
import LogRocket from 'logrocket';
|
||||||
|
LogRocket.init('gvfvfw/bodyshopapp');
|
||||||
|
|
||||||
export default class AppContainer extends Component {
|
export default class AppContainer extends Component {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import i18next from "i18next";
|
|
||||||
import React, { lazy, Suspense, useEffect } from "react";
|
import React, { lazy, Suspense, useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -37,11 +36,6 @@ export default connect(
|
|||||||
}, [checkUserSession]);
|
}, [checkUserSession]);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
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) {
|
if (currentUser.authorized === null) {
|
||||||
return <LoadingSpinner message={t("general.labels.loggingin")} />;
|
return <LoadingSpinner message={t("general.labels.loggingin")} />;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { all, call, put, takeLatest } from "redux-saga/effects";
|
import { all, call, put, takeLatest } from "redux-saga/effects";
|
||||||
|
import LogRocket from "logrocket";
|
||||||
import {
|
import {
|
||||||
auth,
|
auth,
|
||||||
getCurrentUser,
|
getCurrentUser,
|
||||||
updateCurrentUser
|
updateCurrentUser,
|
||||||
} from "../../firebase/firebase.utils";
|
} from "../../firebase/firebase.utils";
|
||||||
import {
|
import {
|
||||||
signInFailure,
|
signInFailure,
|
||||||
@@ -10,7 +11,7 @@ import {
|
|||||||
signOutFailure,
|
signOutFailure,
|
||||||
signOutSuccess,
|
signOutSuccess,
|
||||||
unauthorizedUser,
|
unauthorizedUser,
|
||||||
updateUserDetailsSuccess
|
updateUserDetailsSuccess,
|
||||||
} from "./user.actions";
|
} from "./user.actions";
|
||||||
import UserActionTypes from "./user.types";
|
import UserActionTypes from "./user.types";
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ export function* signInWithEmail({ payload: { email, password } }) {
|
|||||||
email: user.email,
|
email: user.email,
|
||||||
displayName: user.displayName,
|
displayName: user.displayName,
|
||||||
photoURL: user.photoURL,
|
photoURL: user.photoURL,
|
||||||
authorized: true
|
authorized: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -42,13 +43,14 @@ export function* isUserAuthenticated() {
|
|||||||
yield put(unauthorizedUser());
|
yield put(unauthorizedUser());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
LogRocket.identify(user.email);
|
||||||
yield put(
|
yield put(
|
||||||
signInSuccess({
|
signInSuccess({
|
||||||
uid: user.uid,
|
uid: user.uid,
|
||||||
email: user.email,
|
email: user.email,
|
||||||
displayName: user.displayName,
|
displayName: user.displayName,
|
||||||
photoURL: user.photoURL,
|
photoURL: user.photoURL,
|
||||||
authorized: true
|
authorized: true,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -92,6 +94,6 @@ export function* userSagas() {
|
|||||||
call(onEmailSignInStart),
|
call(onEmailSignInStart),
|
||||||
call(onCheckUserSession),
|
call(onCheckUserSession),
|
||||||
call(onSignOutStart),
|
call(onSignOutStart),
|
||||||
call(onUpdateUserDetails)
|
call(onUpdateUserDetails),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8173,6 +8173,11 @@ loglevel@^1.6.6:
|
|||||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.7.tgz#b3e034233188c68b889f5b862415306f565e2c56"
|
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.7.tgz#b3e034233188c68b889f5b862415306f565e2c56"
|
||||||
integrity sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==
|
integrity sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==
|
||||||
|
|
||||||
|
logrocket@^1.0.7:
|
||||||
|
version "1.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/logrocket/-/logrocket-1.0.7.tgz#fe17dbdfc861481cd274fbda533d552de7800a3a"
|
||||||
|
integrity sha512-v6HWEQIsyG+3FkldB7vIAgHh7/qpsiz2Br4bLK5SHBvjqRrHs/Fp+Jr8oiA2GYq0UurAtCu51U8SWft5+OCKtg==
|
||||||
|
|
||||||
long@^4.0.0:
|
long@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
|
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
|
||||||
@@ -11768,8 +11773,6 @@ rxjs@^6.5.3:
|
|||||||
version "6.5.4"
|
version "6.5.4"
|
||||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c"
|
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c"
|
||||||
integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==
|
integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==
|
||||||
dependencies:
|
|
||||||
tslib "^1.9.0"
|
|
||||||
|
|
||||||
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
version "5.1.2"
|
version "5.1.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user