Add Toaster
This commit is contained in:
parent
1df1ba8996
commit
acb051d7a3
2 changed files with 30 additions and 0 deletions
|
|
@ -8,6 +8,14 @@
|
|||
|
||||
import Header from '$lib/components/Header.svelte';
|
||||
import Toaster from '$lib/components/Toaster.svelte';
|
||||
import { ToastsStore } from '$lib/stores/toasts';
|
||||
|
||||
window.onunhandledrejection = (e) => {
|
||||
ToastsStore.addErrorToast({
|
||||
message: e.reason,
|
||||
timeout: 7500,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue