Browse Source

lint

master
Martin McKeaveney 5 years ago
parent
commit
b7d99a6df1
  1. 7
      packages/builder/src/pages/builder/auth/_layout.svelte

7
packages/builder/src/pages/builder/auth/_layout.svelte

@ -1,6 +1,6 @@
<script> <script>
import { auth, admin } from "stores/portal" import { auth, admin } from "stores/portal"
import { redirect, params } from "@roxi/routify" import { redirect } from "@roxi/routify"
// If already authenticated, redirect away from the auth section. // If already authenticated, redirect away from the auth section.
// Check this onMount rather than a reactive statement to avoid trumping // Check this onMount rather than a reactive statement to avoid trumping
@ -16,10 +16,9 @@
$admin.accountPortalUrl && $admin.accountPortalUrl &&
!$admin?.checklist?.sso?.checked !$admin?.checklist?.sso?.checked
) { ) {
const templateKey = $params["?template"]
let url = $admin.accountPortalUrl let url = $admin.accountPortalUrl
if (templateKey) { if ($auth.initTemplate) {
url += `?template=${templateKey}` url += `?template=${$auth.initTemplate}`
} }
window.location.href = url window.location.href = url
} }

Loading…
Cancel
Save