mirror of
https://github.com/Sosokker/chefhai.git
synced 2025-12-19 05:54:08 +01:00
28 lines
785 B
TypeScript
28 lines
785 B
TypeScript
import { initializeApp } from "firebase/app";
|
|
import { getAuth } from "firebase/auth";
|
|
import { getFirestore } from "firebase/firestore";
|
|
|
|
import Constants from 'expo-constants';
|
|
|
|
const {
|
|
FIREBASE_API_KEY,
|
|
FIREBASE_AUTH_DOMAIN,
|
|
FIREBASE_PROJECT_ID,
|
|
FIREBASE_STORAGE_BUCKET,
|
|
FIREBASE_MESSAGING_SENDER_ID,
|
|
FIREBASE_APP_ID,
|
|
} = Constants.expoConfig?.extra || {};
|
|
|
|
const firebaseConfig = {
|
|
apiKey: FIREBASE_API_KEY,
|
|
authDomain: FIREBASE_AUTH_DOMAIN,
|
|
projectId: FIREBASE_PROJECT_ID,
|
|
storageBucket: FIREBASE_STORAGE_BUCKET,
|
|
messagingSenderId: FIREBASE_MESSAGING_SENDER_ID,
|
|
appId: FIREBASE_APP_ID,
|
|
};
|
|
|
|
export const FIREBASE_APP = initializeApp(firebaseConfig);
|
|
export const FIREBASE_AUTH = getAuth(FIREBASE_APP);
|
|
export const FIREBASE_DB = getFirestore(FIREBASE_APP);
|