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-06-25 03:12:55 +12:00
|
|
|
import NotificationDisplay from "components/common/Notification/NotificationDisplay.svelte"
|
2020-06-26 07:04:58 +12: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 19:04:09 +12:00
|
|
|
|
|
|
|
$basepath = "/_builder"
|
2019-07-13 21:35:57 +12:00
|
|
|
</script>
|
|
|
|
|
2020-05-29 10:31:55 +12:00
|
|
|
<NotificationDisplay />
|
2020-05-27 22:54:53 +12:00
|
|
|
<Router {routes} />
|