-
Notifications
You must be signed in to change notification settings - Fork 0
/
firebase.ts
28 lines (25 loc) · 1.04 KB
/
firebase.ts
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
// Import the functions you need from the SDKs you need
import { initializeApp, getApp, getApps } from 'firebase/app';
import { getFirestore } from 'firebase/firestore';
import { getAnalytics } from 'firebase/analytics';
import { getAuth } from 'firebase/auth';
// 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: 'AIzaSyAoJoy95bnd8YRGDm5JFX_aHl1ITmnUJbQ',
authDomain: 'nextflix-17485.firebaseapp.com',
projectId: 'nextflix-17485',
storageBucket: 'nextflix-17485.appspot.com',
messagingSenderId: '432310335318',
appId: '1:432310335318:web:dd878d1b2551b0e82648f7',
measurementId: 'G-13MG21023B',
};
// Initialize Firebase
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp();
const db = getFirestore();
const analytics = getAnalytics(app);
const auth = getAuth();
export default app;
export { analytics, db, auth };