-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.js
More file actions
32 lines (28 loc) · 1.02 KB
/
firebase.js
File metadata and controls
32 lines (28 loc) · 1.02 KB
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
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAnalytics, isSupported } from "firebase/analytics";
import { getFirestore } from 'firebase/firestore'
// 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: "AIzaSyAKzizTdcs5V0mHLuQhfPuuWvcUZ14J8NM",
authDomain: "flashcardsaas-ddc6d.firebaseapp.com",
projectId: "flashcardsaas-ddc6d",
storageBucket: "flashcardsaas-ddc6d.appspot.com",
messagingSenderId: "895059270332",
appId: "1:895059270332:web:46183445cdf427d0444eb9",
measurementId: "G-NE3E38NPRW"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
if(typeof window !== "undefined") {
isSupported().then((yes) => {
if(yes) {
const analytics = getAnalytics(app)
}
})
}
const db = getFirestore(app);
export {db};