1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00
budibase/packages/builder/src/App.svelte
Martin McKeaveney 398f200661 merge
2020-06-01 16:27:27 +01:00

34 lines
881 B
Svelte

<script>
import Modal from "svelte-simple-modal"
import { onMount } from "svelte"
import { Router, basepath } from "@sveltech/routify"
import { routes } from "../routify/routes"
import { store, initialise } from "builderStore"
import AppNotification, {
showAppNotification,
} from "components/common/AppNotification.svelte"
import { NotificationDisplay } from "@beyonk/svelte-notifications"
function showErrorBanner() {
showAppNotification({
status: "danger",
message:
"Whoops! Looks like we're having trouble. Please refresh the page.",
})
}
onMount(async () => {
window.addEventListener("error", showErrorBanner)
window.addEventListener("unhandledrejection", showErrorBanner)
})
$basepath = "/_builder"
</script>
<AppNotification />
<!-- svelte-notifications -->
<NotificationDisplay />
<Router {routes} />