2021-12-09 22:05:55 +00:00
|
|
|
import { getFirestore } from '@firebase/firestore'
|
2022-01-21 23:21:46 +00:00
|
|
|
import { initializeApp, getApps, getApp } from 'firebase/app'
|
2022-03-08 04:52:10 +00:00
|
|
|
import { FIREBASE_CONFIG } from '../../../common/envs/constants'
|
2021-12-24 21:06:01 +00:00
|
|
|
|
2021-12-08 16:42:19 +00:00
|
|
|
// Initialize Firebase
|
2022-03-08 02:34:49 +00:00
|
|
|
export const app = getApps().length ? getApp() : initializeApp(FIREBASE_CONFIG)
|
2022-01-21 23:21:46 +00:00
|
|
|
|
2021-12-09 22:05:55 +00:00
|
|
|
export const db = getFirestore(app)
|