Implement comprehensive enhancements: push notifications, export functionality, user profiles, community sharing, offline improvements, analytics, accessibility, testing, and documentation
This commit is contained in:
1 parent
1932dbe1fc
commit
3d8ba5b8f0
21 files changed
+6273
-2585
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import * as admin from 'firebase-admin';
|
||||
|
||||
if (!admin.apps.length && process.env.FIREBASE_PROJECT_ID) {
|
||||
admin.initializeApp({
|
||||
credential: admin.credential.cert({
|
||||
projectId: process.env.FIREBASE_PROJECT_ID,
|
||||
privateKey: process.env.FIREBASE_PRIVATE_KEY?.replace(/\\n/g, '\n'),
|
||||
clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
export { admin };
|
||||
+22
-1
@@ -2,6 +2,8 @@
|
||||
import { initializeApp } from 'firebase/app';
|
||||
import { getAuth } from 'firebase/auth';
|
||||
import { getFirestore } from 'firebase/firestore';
|
||||
import { getStorage } from 'firebase/storage';
|
||||
import { getAnalytics } from 'firebase/analytics';
|
||||
|
||||
// TODO: Add SDKs for Firebase products that you want to use
|
||||
// https://firebase.google.com/docs/web/setup#available-libraries
|
||||
@@ -23,4 +25,23 @@ const app = initializeApp(firebaseConfig);
|
||||
export const auth = getAuth(app);
|
||||
|
||||
// Initialize Cloud Firestore and get a reference to the service
|
||||
export const db = getFirestore(app);
|
||||
export const db = getFirestore(app);
|
||||
|
||||
// Initialize Firebase Storage and get a reference to the service
|
||||
export const storage = getStorage(app);
|
||||
|
||||
// Initialize Firebase Analytics and get a reference to the service
|
||||
let analytics: any = null;
|
||||
if (typeof window !== 'undefined') {
|
||||
import('firebase/analytics').then(({ getAnalytics, isSupported }) => {
|
||||
isSupported().then((supported) => {
|
||||
if (supported) {
|
||||
analytics = getAnalytics(app);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export { analytics };
|
||||
|
||||
export { app };
|
||||
Reference in new issue
Block a user