Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
fix(app): update firebase config
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao committed Feb 25, 2023
1 parent 8493375 commit 5002460
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/config/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@ const firebaseConfig = {
apiKey: import.meta.env.VITE_FIREBASE_APIKEY,
authDomain: import.meta.env.VITE_FIREBASE_AUTHDOMAIN,
projectId: import.meta.env.VITE_FIREBASE_PROJECTID,
appId: import.meta.env.VITE_FIREBASE_APPID,
measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENTID,
};

initializeApp(firebaseConfig);

const isDev = process.env.NODE_ENV === 'development';
if (!isDev) {
const firebaseAnalyticsConfig = {
apiKey: import.meta.env.VITE_FIREBASE_ANALYTICS_APIKEY,
authDomain: import.meta.env.VITE_FIREBASE_ANALYTICS_AUTHDOMAIN,
projectId: import.meta.env.VITE_FIREBASE_ANALYTICS_PROJECTID,
appId: import.meta.env.VITE_FIREBASE_ANALYTICS_APPID,
measurementId: import.meta.env.VITE_FIREBASE_ANALYTICS_MEASUREMENTID,
};

const appAnalytics = initializeApp(firebaseAnalyticsConfig, 'appAnalytics');
getAnalytics(appAnalytics);
}
const fbApp = initializeApp(firebaseConfig);
getAnalytics(fbApp);

0 comments on commit 5002460

Please sign in to comment.