-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebase.js
48 lines (40 loc) · 1.45 KB
/
firebase.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import * as firebase from 'firebase'
import 'firebase/auth'
import 'firebase/firestore'
const firebaseConfig = {
apiKey: "AIzaSyCD9YHBPVvTWUAMF6I1S7B47C709t_M69c",
authDomain: "csgo-d804e.firebaseapp.com",
projectId: "csgo-d804e",
storageBucket: "csgo-d804e.appspot.com",
messagingSenderId: "1076916350226",
appId: "1:1076916350226:web:a4f01f11e21da98a1a97cb",
measurementId: "G-8XY0LJW7N2"
};
let app
if ((firebase.apps.length === 0)) {
app = firebase.initializeApp(firebaseConfig)
} else {
app = firebase.app()
}
const auth = firebase.auth()
const db = app.firestore()
export {auth, db}
// Import the functions you need from the SDKs you need
// import { initializeApp } from "firebase/app";
// import { getAnalytics } from "firebase/analytics";
// // TODO: Add SDKs for Firebase products that you want to use
// // https://firebase.google.com/docs/web/setup#available-libraries
// // Your web app's Firebase configuration
// // For Firebase JS SDK v7.20.0 and later, measurementId is optional
// const firebaseConfig = {
// apiKey: "AIzaSyCD9YHBPVvTWUAMF6I1S7B47C709t_M69c",
// authDomain: "csgo-d804e.firebaseapp.com",
// projectId: "csgo-d804e",
// storageBucket: "csgo-d804e.appspot.com",
// messagingSenderId: "1076916350226",
// appId: "1:1076916350226:web:a4f01f11e21da98a1a97cb",
// measurementId: "G-8XY0LJW7N2"
// };
// // Initialize Firebase
// const app = initializeApp(firebaseConfig);
// const analytics = getAnalytics(app);