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'
|
2021-12-24 21:06:01 +00:00
|
|
|
|
2021-12-30 07:31:26 +00:00
|
|
|
// TODO: Reenable this when we have a way to set the Firebase db in dev
|
2022-01-31 04:29:16 +00:00
|
|
|
// export const isProd = process.env.NODE_ENV === 'production'
|
|
|
|
export const isProd = true
|
2021-12-24 21:06:01 +00:00
|
|
|
|
|
|
|
const firebaseConfig = isProd
|
|
|
|
? {
|
|
|
|
apiKey: 'AIzaSyDp3J57vLeAZCzxLD-vcPaGIkAmBoGOSYw',
|
|
|
|
authDomain: 'mantic-markets.firebaseapp.com',
|
|
|
|
projectId: 'mantic-markets',
|
|
|
|
storageBucket: 'mantic-markets.appspot.com',
|
|
|
|
messagingSenderId: '128925704902',
|
|
|
|
appId: '1:128925704902:web:f61f86944d8ffa2a642dc7',
|
|
|
|
measurementId: 'G-SSFK1Q138D',
|
|
|
|
}
|
|
|
|
: {
|
|
|
|
apiKey: 'AIzaSyBoq3rzUa8Ekyo3ZaTnlycQYPRCA26VpOw',
|
|
|
|
authDomain: 'dev-mantic-markets.firebaseapp.com',
|
|
|
|
projectId: 'dev-mantic-markets',
|
|
|
|
storageBucket: 'dev-mantic-markets.appspot.com',
|
|
|
|
messagingSenderId: '134303100058',
|
|
|
|
appId: '1:134303100058:web:27f9ea8b83347251f80323',
|
|
|
|
measurementId: 'G-YJC9E37P37',
|
|
|
|
}
|
2021-12-08 16:42:19 +00:00
|
|
|
|
|
|
|
// Initialize Firebase
|
2022-01-21 23:21:46 +00:00
|
|
|
export const app = getApps().length ? getApp() : initializeApp(firebaseConfig)
|
|
|
|
|
2021-12-09 22:05:55 +00:00
|
|
|
export const db = getFirestore(app)
|