if user is not logged in redirect
This commit is contained in:
parent
a73cb6f99c
commit
77c58761af
|
@ -1,6 +1,13 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { user } from '$lib/auth'
|
||||||
import { Button } from '$lib/components/Common'
|
import { Button } from '$lib/components/Common'
|
||||||
|
import { onMount } from 'svelte'
|
||||||
import { _ } from 'svelte-i18n'
|
import { _ } from 'svelte-i18n'
|
||||||
|
import { navigate } from '$lib/router'
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
if (!$user) navigate('/oauth')
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex justify-center mt-20">
|
<div class="flex justify-center mt-20">
|
||||||
|
|
Loading…
Reference in New Issue