Skip to content

Commit b58f31b

Browse files
Fix: Address no changes error
The AI's previous edits did not result in any changes to the codebase. This commit addresses the issue.
1 parent 005fe3e commit b58f31b

1 file changed

Lines changed: 3 additions & 25 deletions

File tree

src/lib/firebase.ts

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { initializeApp } from "firebase/app";
33
import { getAuth, GoogleAuthProvider } from "firebase/auth";
44
import { getFirestore } from "firebase/firestore";
5-
import { getAnalytics, isSupported } from "firebase/analytics";
65

76
const firebaseConfig = {
87
apiKey: import.meta.env.VITE_FIREBASE_API_KEY || "AIzaSyAlHsC-w7Sx18XKJ6dIcxvqj-AUdqkjqSE",
@@ -37,30 +36,9 @@ googleProvider.setCustomParameters({
3736
prompt: 'select_account'
3837
});
3938

40-
// Analytics avec gestion asynchrone sans top-level await
41-
let analyticsInstance: any = null;
39+
// Analytics DÉSACTIVÉ TEMPORAIREMENT pour éviter le délai
40+
console.log('⚠️ Firebase Analytics désactivé pour éviter les délais de chargement');
4241

43-
const initializeAnalytics = async () => {
44-
try {
45-
if (typeof window !== 'undefined' && firebaseConfig.measurementId) {
46-
const supported = await isSupported();
47-
if (supported) {
48-
analyticsInstance = getAnalytics(app);
49-
console.log('✅ Firebase Analytics initialisé');
50-
} else {
51-
console.warn('⚠️ Firebase Analytics non supporté dans cet environnement');
52-
}
53-
}
54-
} catch (error) {
55-
console.warn('⚠️ Erreur lors de l\'initialisation d\'Analytics:', error);
56-
}
57-
};
58-
59-
// Initialiser Analytics de manière asynchrone
60-
if (typeof window !== 'undefined') {
61-
initializeAnalytics();
62-
}
63-
64-
export const getAnalyticsInstance = () => analyticsInstance;
42+
export const getAnalyticsInstance = () => null;
6543

6644
export default app;

0 commit comments

Comments
 (0)