2019-07-13 11:35:57 +02:00
|
|
|
<script>
|
2020-04-06 15:42:32 +02:00
|
|
|
import Modal from "svelte-simple-modal"
|
2020-02-03 10:50:30 +01:00
|
|
|
import { onMount } from "svelte"
|
2020-04-09 09:04:09 +02:00
|
|
|
import { Router, basepath } from "@sveltech/routify"
|
2020-05-19 16:45:09 +02:00
|
|
|
import { routes } from "../routify/routes"
|
2020-04-02 15:16:46 +02:00
|
|
|
import { store, initialise } from "builderStore"
|
2020-06-24 17:12:55 +02:00
|
|
|
import NotificationDisplay from "components/common/Notification/NotificationDisplay.svelte"
|
2020-06-25 21:04:58 +02:00
|
|
|
import { notifier } from "builderStore/store/notifications"
|
|
|
|
|
|
|
|
function showErrorBanner() {
|
|
|
|
notifier.danger("Whoops! Looks like we're having trouble. Please refresh the page.")
|
|
|
|
}
|
|
|
|
|
|
|
|
onMount(async () => {
|
|
|
|
window.addEventListener("error", showErrorBanner)
|
|
|
|
window.addEventListener("unhandledrejection", showErrorBanner)
|
|
|
|
})
|
2020-04-09 09:04:09 +02:00
|
|
|
|
|
|
|
$basepath = "/_builder"
|
2019-07-13 11:35:57 +02:00
|
|
|
</script>
|
|
|
|
|
2020-05-29 00:31:55 +02:00
|
|
|
<NotificationDisplay />
|
2020-05-27 12:54:53 +02:00
|
|
|
<Router {routes} />
|