1
0
Fork 0
mirror of synced 2024-07-05 06:20:55 +12:00

Prevent access to create super admin screen once an admin has been created

This commit is contained in:
Andrew Kingston 2021-05-18 14:43:05 +01:00
parent 5daccbd76e
commit 3b6b3877b1
2 changed files with 19 additions and 3 deletions

View file

@ -0,0 +1,19 @@
<script>
import { admin } from "stores/portal"
import { onMount } from "svelte"
import { redirect } from "@roxi/routify"
let loaded = false
onMount(() => {
if ($admin?.checklist?.adminUser) {
$redirect("../")
} else {
loaded = true
}
})
</script>
{#if loaded}
<slot />
{/if}

View file

@ -68,9 +68,6 @@
justify-content: flex-start;
align-items: stretch;
}
.center {
text-align: center;
}
img {
width: 40px;
margin: 0 auto;