Add Firestore package and config

This commit is contained in:
Austin Chen 2021-12-08 08:42:19 -08:00
parent b5145305e6
commit 55ddb2a7d4
3 changed files with 2281 additions and 42 deletions

21
web/lib/firebase/init.ts Normal file
View File

@ -0,0 +1,21 @@
import { initializeApp } from 'firebase/app'
const firebaseConfig = {
apiKey: 'AIzaSyDp3J57vLeAZCzxLD-vcPaGIkAmBoGOSYw',
authDomain: 'mantic-markets.firebaseapp.com',
projectId: 'mantic-markets',
storageBucket: 'mantic-markets.appspot.com',
messagingSenderId: '128925704902',
appId: '1:128925704902:web:f61f86944d8ffa2a642dc7',
measurementId: '${config.measurementId}',
}
// Initialize Firebase
export const app = initializeApp(firebaseConfig)
try {
// Note: this is still throwing a console error atm...
import('firebase/analytics').then((analytics) => {
analytics.getAnalytics(app)
})
} catch (e) {
console.warn('Analytics were blocked')
}

2301
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
"@heroicons/react": "1.0.5",
"chart.js": "^3.6.1",
"daisyui": "^1.16.2",
"firebase": "^9.6.0",
"next": "12.0.4",
"react": "17.0.2",
"react-chartjs-2": "^4.0.0",