feat: add useAsync and implement it on every async mutation method

This commit is contained in:
mrjvs
2026-08-16 12:44:35 +02:00
parent cc5f85485c
commit bae28ef863
12 changed files with 236 additions and 196 deletions

View File

@@ -2,6 +2,15 @@
import { Toast } from 'reka-ui/namespaced';
const toastStore = useToasts();
const route = useRoute();
const routeKey = computed(() => route.path);
watch(routeKey, () => {
toastStore.clear(); // Clear toasts when route changes
});
onUnmounted(() => {
toastStore.clear(); // Clear toasts toast rendered gets removed (route change)
});
function handleOpenUpdate(id: number, open: boolean) {
if (!open) {