fix(href): replaced location.replace with goto
This commit is contained in:
parent
a3e437d966
commit
8959223016
@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import userstore from '$lib/userstore';
|
||||
import { AuthService } from '@odit/lfk-client-js';
|
||||
|
||||
@ -14,7 +15,7 @@
|
||||
})) as import('@odit/lfk-client-js').ResponseAuth;
|
||||
loginError=false;
|
||||
await userstore.login(auth);
|
||||
location.replace('./registration');
|
||||
goto('./registration', {replaceState: true})
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
loginError = true;
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import userstore from '$lib/userstore';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@ -11,7 +12,7 @@
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
userstore.logout();
|
||||
location.replace(`./login`);
|
||||
goto('./login', {replaceState: true})
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user