9 lines
319 B
TypeScript
9 lines
319 B
TypeScript
import { getFirestore } from '@firebase/firestore'
|
|
import { initializeApp, getApps, getApp } from 'firebase/app'
|
|
import { FIREBASE_CONFIG } from '../../../common/envs/constants'
|
|
|
|
// Initialize Firebase
|
|
export const app = getApps().length ? getApp() : initializeApp(FIREBASE_CONFIG)
|
|
|
|
export const db = getFirestore(app)
|