-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirebaseApp.ts
25 lines (21 loc) · 1017 Bytes
/
firebaseApp.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
// Import the functions you need from the SDKs you need
import Constants from 'expo-constants';
import { initializeApp } from 'firebase/app';
import 'firebase/auth';
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: Constants.expoConfig?.extra?.firebaseApiKey,
authDomain: Constants.expoConfig?.extra?.firebaseAuthDomain,
projectId: Constants.expoConfig?.extra?.firebaseProjectId,
storageBucket: Constants.expoConfig?.extra?.firebaseStorageBucket,
messagingSenderId: Constants.expoConfig?.extra?.firebaseMessagingSenderId,
appId: Constants.expoConfig?.extra?.firebaseAppId,
};
// Initialize Firebase
export const firebaseApp = initializeApp(firebaseConfig);
export const db = getFirestore(firebaseApp);
export default firebaseApp;