1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00
budibase/packages/builder/src/App.svelte

34 lines
881 B
Svelte
Raw Normal View History

2019-07-13 21:35:57 +12:00
<script>
import Modal from "svelte-simple-modal"
2020-02-03 22:50:30 +13:00
import { onMount } from "svelte"
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"
import AppNotification, {
showAppNotification,
} 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.",
})
}
onMount(async () => {
2020-03-31 09:14:41 +13:00
window.addEventListener("error", showErrorBanner)
window.addEventListener("unhandledrejection", showErrorBanner)
})
$basepath = "/_builder"
2019-07-13 21:35:57 +12:00
</script>
2020-06-01 22:52:15 +12:00
<AppNotification />
<!-- svelte-notifications -->
<NotificationDisplay />
2020-06-01 22:52:15 +12:00
2020-05-27 22:54:53 +12:00
<Router {routes} />