1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00
This commit is contained in:
Martin McKeaveney 2021-05-28 14:06:18 +01:00
parent f348f18621
commit c4449cf1b2

View file

@ -1,18 +1,4 @@
<script>
import { onMount } from "svelte"
import { redirect, goto } from "@roxi/routify"
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")
}
})
import { redirect } from "@roxi/routify"
$redirect("./apps")
</script>