mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -03:00
fix: no se inicializaba el firebaseapp
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user