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;