tidy up
This commit is contained in:
parent
f348f18621
commit
c4449cf1b2
|
@ -1,18 +1,4 @@
|
||||||
<script>
|
<script>
|
||||||
import { onMount } from "svelte"
|
import { redirect } from "@roxi/routify"
|
||||||
import { redirect, goto } from "@roxi/routify"
|
$redirect("./apps")
|
||||||
import { apps, organisation, auth } from "stores/portal"
|
|
||||||
import { AppStatus } from "constants"
|
|
||||||
|
|
||||||
onMount(async () => {
|
|
||||||
await apps.load()
|
|
||||||
// Skip the portal if you only have one app
|
|
||||||
if (!$auth.isBuilder && $apps.filter(app => app.status === AppStatus.DEPLOYED).length === 1) {
|
|
||||||
// window.location = `/${publishedApps[0].prodId}`
|
|
||||||
$redirect(`/${publishedApps[0].prodId}`)
|
|
||||||
} else {
|
|
||||||
$goto("./apps")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue