|
|
@@ -1,6 +1,7 @@
|
|
|
<script>
|
|
|
import { onMount } from 'svelte';
|
|
|
import { authentication } from '../store.js';
|
|
|
+ import { goto } from '$app/navigation';
|
|
|
|
|
|
let isAuthenticated = false;
|
|
|
let isLoading = true;
|
|
|
@@ -56,6 +57,7 @@
|
|
|
const result = await response.json();
|
|
|
authentication.set(result);
|
|
|
localStorage.setItem('authentication', JSON.stringify(result));
|
|
|
+ await goto("/home");
|
|
|
} else {
|
|
|
const error = await response.json();
|
|
|
console.error('Login failed:', error);
|