1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00
budibase/packages/builder/src/App.svelte

32 lines
776 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-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-04-03 02:16:46 +13:00
<AppNotification />
2019-09-30 17:20:21 +13:00
<Modal>
<Router {routes} />
</Modal>