forked from tsai/budibase
2 changed files with 19 additions and 3 deletions
@ -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} |
||||
Loading…
Reference in new issue