Package updates and firebase refactor to SDK 9.
This commit is contained in:
@@ -2,7 +2,7 @@ import { withApollo } from "@apollo/client/react/hoc";
|
||||
import React, { Component } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { logImEXEvent, messaging } from "../../firebase/firebase.utils";
|
||||
//import { logImEXEvent, messaging } from "../../firebase/firebase.utils";
|
||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -15,21 +15,20 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
class FcmNotificationComponent extends Component {
|
||||
async componentDidMount() {
|
||||
//const { client, currentUser } = this.props;
|
||||
if (!!!messaging) return; //Skip all of the notification functionality if the firebase SDK could not start.
|
||||
|
||||
messaging
|
||||
.requestPermission()
|
||||
.then(async function () {
|
||||
// const token = await messaging.getToken();
|
||||
// client.mutate({
|
||||
// mutation: UPDATE_FCM_TOKEN,
|
||||
// variables: { authEmail: currentUser.email, token: { [token]: true } },
|
||||
// });
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.log("Unable to get permission to notify.", err);
|
||||
logImEXEvent("fcm_permission_denied", { message: err });
|
||||
});
|
||||
// if (!!!messaging) return; //Skip all of the notification functionality if the firebase SDK could not start.
|
||||
// messaging
|
||||
// .requestPermission()
|
||||
// .then(async function () {
|
||||
// // const token = await messaging.getToken();
|
||||
// // client.mutate({
|
||||
// // mutation: UPDATE_FCM_TOKEN,
|
||||
// // variables: { authEmail: currentUser.email, token: { [token]: true } },
|
||||
// // });
|
||||
// })
|
||||
// .catch(function (err) {
|
||||
// console.log("Unable to get permission to notify.", err);
|
||||
// logImEXEvent("fcm_permission_denied", { message: err });
|
||||
// });
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -37,15 +37,9 @@ export function PaymentsExportAllButton({
|
||||
|
||||
let QbXmlResponse;
|
||||
try {
|
||||
QbXmlResponse = await axios.post(
|
||||
"/accounting/qbxml/payments",
|
||||
{ payments: paymentIds },
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${await auth.currentUser.getIdToken()}`,
|
||||
},
|
||||
}
|
||||
);
|
||||
QbXmlResponse = await axios.post("/accounting/qbxml/payments", {
|
||||
payments: paymentIds,
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("Error getting QBXML from Server.", error);
|
||||
notification["error"]({
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Link } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import ImEXOnlineLogo from "../../assets/logo192.png";
|
||||
import { auth } from "../../firebase/firebase.utils";
|
||||
import { checkActionCode } from "@firebase/auth";
|
||||
import { validatePasswordResetStart } from "../../redux/user/user.actions";
|
||||
import { selectPasswordReset } from "../../redux/user/user.selectors";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
@@ -35,7 +36,7 @@ export function UserValidatePwReset({
|
||||
useEffect(() => {
|
||||
async function checkCodeValid() {
|
||||
try {
|
||||
const codeValid = await auth.checkActionCode(oobCode);
|
||||
const codeValid = await checkActionCode(auth, oobCode);
|
||||
console.log("codeValid :>> ", codeValid);
|
||||
setCodeValid({ loading: false, ...codeValid });
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user