Redirect if opening a locked app

This commit is contained in:
Andrew Kingston 2022-01-27 13:44:09 +00:00
parent 62860c3e9b
commit f8378e551d
1 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@
import NPSFeedbackForm from "components/feedback/NPSFeedbackForm.svelte"
import { API } from "api"
import { auth, admin } from "stores/portal"
import { isActive, goto, layout } from "@roxi/routify"
import { isActive, goto, layout, redirect } from "@roxi/routify"
import Logo from "assets/bb-emblem.svg"
import { capitalise } from "helpers"
import UpgradeModal from "components/upgrade/UpgradeModal.svelte"
@ -42,9 +42,8 @@
await flags.fetch()
return pkg
} catch (error) {
// TODO: some stuff about redirecting if locked
// $redirect("../../")
notifications.error("Error initialising app")
notifications.error(`Error initialising app: ${error?.message}`)
$redirect("../../")
}
}