Browse Source

Remove redirect when user only has access to one app

master
Andrew Kingston 5 years ago
parent
commit
788f517b04
  1. 7
      packages/builder/src/pages/builder/apps/index.svelte

7
packages/builder/src/pages/builder/apps/index.svelte

@ -28,12 +28,7 @@
onMount(async () => { onMount(async () => {
await organisation.init() await organisation.init()
await apps.load() await apps.load()
// Skip the portal if you only have one app loaded = true
if (!$auth.isBuilder && $apps.filter(publishedAppsOnly).length === 1) {
window.location = `/${publishedApps[0].prodId}`
} else {
loaded = true
}
}) })
const publishedAppsOnly = app => app.status === AppStatus.DEPLOYED const publishedAppsOnly = app => app.status === AppStatus.DEPLOYED

Loading…
Cancel
Save