2019-07-13 21:35:57 +12:00
|
|
|
<script>
|
2020-04-07 01:42:32 +12:00
|
|
|
import Modal from "svelte-simple-modal"
|
2020-02-03 22:50:30 +13:00
|
|
|
import { onMount } from "svelte"
|
2020-04-09 19:04:09 +12:00
|
|
|
import { Router, basepath } from "@sveltech/routify"
|
2020-05-20 02:45:09 +12:00
|
|
|
import { routes } from "../routify/routes"
|
2020-04-03 02:16:46 +13:00
|
|
|
import { store, initialise } from "builderStore"
|
2020-03-31 22:56:39 +13:00
|
|
|
import AppNotification, {
|
|
|
|
showAppNotification,
|
2020-04-01 00:16:03 +13:00
|
|
|
} from "components/common/AppNotification.svelte"
|
2020-02-03 22:50:30 +13:00
|
|
|
|
2020-03-31 09:14:41 +13:00
|
|
|
function showErrorBanner() {
|
|
|
|
showAppNotification({
|
|
|
|
status: "danger",
|
|
|
|
message:
|
|
|
|
"Whoops! Looks like we're having trouble. Please refresh the page.",
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2020-04-29 01:39:35 +12:00
|
|
|
onMount(async () => {
|
2020-03-31 09:14:41 +13:00
|
|
|
window.addEventListener("error", showErrorBanner)
|
|
|
|
window.addEventListener("unhandledrejection", showErrorBanner)
|
|
|
|
})
|
2020-04-09 19:04:09 +12:00
|
|
|
|
|
|
|
$basepath = "/_builder"
|
2019-07-13 21:35:57 +12:00
|
|
|
</script>
|
|
|
|
|
2020-04-03 02:16:46 +13:00
|
|
|
<AppNotification />
|
2019-09-30 17:20:21 +13:00
|
|
|
|
2020-05-18 17:40:29 +12:00
|
|
|
<Modal>
|
|
|
|
<Router {routes} />
|
|
|
|
</Modal>
|