fix: no se inicializaba el firebaseapp

This commit is contained in:
2026-01-29 20:18:19 -03:00
parent c0d637a34c
commit 0ea873e039

View File

@@ -2,6 +2,7 @@ import { get, writable } from 'svelte/store';
import { browser } from '$app/environment'; import { browser } from '$app/environment';
import type { Sesion } from '../../types'; import type { Sesion } from '../../types';
import { apiBase } from '@/stores/url'; import { apiBase } from '@/stores/url';
import { getFirebaseApp, getFirebaseAuth } from './firebase';
const { subscribe } = apiBase; const { subscribe } = apiBase;
let baseUrl: string = ''; let baseUrl: string = '';
@@ -54,9 +55,9 @@ if (browser) {
if (sesion.isFirebase) { if (sesion.isFirebase) {
try { try {
// Simulamos la importación dinámica de Firebase getFirebaseApp();
const { getAuth } = await import('firebase/auth');
const auth = getAuth(); const auth = getFirebaseAuth();
const user = auth.currentUser; const user = auth.currentUser;
if (user) { if (user) {