This commit is contained in:
2024-02-27 23:10:08 -05:00
parent 365f8bb6e6
commit 47319c270c
2 changed files with 54 additions and 34 deletions
+30 -29
View File
@@ -1,28 +1,32 @@
import React from "react";
import ReactDOM from "react-dom";
import firebase from "firebase/app";
import "firebase/functions";
'use strict';
const FIREBASE_CONFIG = {
apiKey: "AIzaSyDKw8HXWRn3dtkIRETv-BxtwnklZIpIkxU",
authDomain: "vaxandme.firebaseapp.com",
projectId: "vaxandme",
storageBucket: "vaxandme.appspot.com",
messagingSenderId: "614738281692",
appId: "1:614738281692:web:7a89e0af76675e4f0ea019",
measurementId: "G-N016TVJ6JC",
};
//import firebase from "firebase/app";
//import "firebase/functions";
//
//const FIREBASE_CONFIG = {
// apiKey: "AIzaSyDKw8HXWRn3dtkIRETv-BxtwnklZIpIkxU",
// authDomain: "vaxandme.firebaseapp.com",
// projectId: "vaxandme",
// storageBucket: "vaxandme.appspot.com",
// messagingSenderId: "614738281692",
// appId: "1:614738281692:web:7a89e0af76675e4f0ea019",
// measurementId: "G-N016TVJ6JC",
//};
//
//firebase.initializeApp(FIREBASE_CONFIG);
//
//if (window.location.host !== "www.vaxand.me") {
// firebase.functions().useEmulator(window.location.host.split(":")[0], 5001);
//}
//
//const fb_functions = firebase.functions();
//const saveResult = fb_functions.httpsCallable("saveResultV1");
//const getPastResult = fb_functions.httpsCallable("getPastResultV1");
//const getStats = fb_functions.httpsCallable("getStatsV1");
firebase.initializeApp(FIREBASE_CONFIG);
if (window.location.host !== "www.vaxand.me") {
firebase.functions().useEmulator(window.location.host.split(":")[0], 5001);
}
const fb_functions = firebase.functions();
const saveResult = fb_functions.httpsCallable("saveResultV1");
const getPastResult = fb_functions.httpsCallable("getPastResultV1");
const getStats = fb_functions.httpsCallable("getStatsV1");
const saveResult = () => new Promise((resolve, reject) => reject());
const getPastResult = () => new Promise((resolve, reject) => reject());
const getStats = () => new Promise((resolve, reject) => reject());
const VAX_NAMES = {
PB: "Pfizer-BioNTech",
@@ -980,9 +984,6 @@ class App extends React.Component {
}
}
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.querySelector("#root")
);
const domContainer = document.querySelector('#root');
const root = ReactDOM.createRoot(domContainer);
root.render(React.createElement(App));