mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-26 10:36:39 -05:00
feat: add useAsync and implement it on every async mutation method
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user