Prevent access to create super admin screen once an admin has been created
This commit is contained in:
parent
5daccbd76e
commit
3b6b3877b1
|
@ -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}
|
|
@ -68,9 +68,6 @@
|
|||
justify-content: flex-start;
|
||||
align-items: stretch;
|
||||
}
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
img {
|
||||
width: 40px;
|
||||
margin: 0 auto;
|
||||
|
|
Loading…
Reference in New Issue