File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import { initializeApp } from "firebase/app" ;
33import { getAuth , GoogleAuthProvider } from "firebase/auth" ;
44import { getFirestore } from "firebase/firestore" ;
5- import { getAnalytics , isSupported } from "firebase/analytics" ;
65
76const 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
6644export default app ;
You can’t perform that action at this time.
0 commit comments