Mejora de seguridad
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
let sidebarOpen = false;
|
||||
let mounted = false;
|
||||
|
||||
onMount(() => {
|
||||
auth.init();
|
||||
onMount(async () => {
|
||||
await auth.init();
|
||||
mounted = true;
|
||||
});
|
||||
|
||||
@@ -29,7 +29,12 @@
|
||||
</script>
|
||||
|
||||
<div class="min-h-screen bg-gray-50">
|
||||
{#if $auth.isAuthenticated}
|
||||
{#if !mounted}
|
||||
<!-- Esperando inicialización de sesión -->
|
||||
<div class="flex items-center justify-center min-h-screen bg-gray-50">
|
||||
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"></div>
|
||||
</div>
|
||||
{:else if $auth.isAuthenticated}
|
||||
<!-- Internal Layout with Sidebar -->
|
||||
<div class="flex h-screen overflow-hidden">
|
||||
<!-- Sidebar -->
|
||||
|
||||
Reference in New Issue
Block a user