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-06-01 21:41:28 +12:00
|
|
|
import { NotificationDisplay } from "@beyonk/svelte-notifications"
|
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-06-01 22:52:15 +12:00
|
|
|
<AppNotification />
|
|
|
|
|
|
|
|
<!-- svelte-notifications -->
|
2020-05-29 10:31:55 +12:00
|
|
|
<NotificationDisplay />
|
2020-06-01 22:52:15 +12:00
|
|
|
|
2020-05-27 22:54:53 +12:00
|
|
|
<Router {routes} />
|