Browse Source

tidy up

pull/1586/head
Martin McKeaveney 5 years ago
parent
commit
587e6d36a1
  1. 18
      packages/builder/src/pages/builder/portal/index.svelte

18
packages/builder/src/pages/builder/portal/index.svelte

@ -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>

Loading…
Cancel
Save