qa: Handle errors with toaster
This commit is contained in:
parent
9044260a71
commit
cb489396ab
5 changed files with 108 additions and 2 deletions
|
|
@ -8,13 +8,19 @@
|
|||
} from 'sveltestrap';
|
||||
|
||||
import Header from '$lib/components/Header.svelte';
|
||||
import Toaster from '$lib/components/Toaster.svelte';
|
||||
import { version } from '$lib/stores/auth';
|
||||
import { ToastsStore } from '$lib/stores/toasts';
|
||||
import { view } from '$lib/stores/todo';
|
||||
|
||||
version.refresh();
|
||||
setInterval(version.refresh, 30000);
|
||||
|
||||
view.refresh();
|
||||
view.refresh().catch((err) => {
|
||||
ToastsStore.addErrorToast({
|
||||
msg: err,
|
||||
})
|
||||
});
|
||||
setInterval(view.refresh, 60000);
|
||||
</script>
|
||||
|
||||
|
|
@ -24,6 +30,7 @@
|
|||
|
||||
<Header />
|
||||
<slot></slot>
|
||||
<Toaster />
|
||||
|
||||
<style>
|
||||
:global(body) {
|
||||
|
|
|
|||
Reference in a new issue