From 889c1a28bf2065056e1af6a237bfb3a6f3908cd4 Mon Sep 17 00:00:00 2001
From: Ethan Chew
Date: Thu, 28 Sep 2023 10:37:03 +0800
Subject: [PATCH] fix: use useMutation
---
components/admin/home/create-event-popup.vue | 65 +++++++++-----------
components/admin/home/delete-event-popup.vue | 32 ++++------
components/admin/home/events-table.vue | 14 ++---
components/admin/home/update-event-popup.vue | 17 +----
4 files changed, 51 insertions(+), 77 deletions(-)
diff --git a/components/admin/home/create-event-popup.vue b/components/admin/home/create-event-popup.vue
index 64f84c0e..83f5918e 100644
--- a/components/admin/home/create-event-popup.vue
+++ b/components/admin/home/create-event-popup.vue
@@ -1,5 +1,8 @@
@@ -57,24 +50,24 @@ function resetRefs() {
-
-
-
-
-
-
+
+
+
+
+
+
-
+
Done
-
+
Close
-
- Successfully created event with ID {{ state.newEventId }}! You may now close the popup.
+
+ Successfully created event with ID {{ newEventId }}! You may now close the popup.
-
+
Something went wrong... Please try again later.
diff --git a/components/admin/home/delete-event-popup.vue b/components/admin/home/delete-event-popup.vue
index fd942166..7623ac2d 100644
--- a/components/admin/home/delete-event-popup.vue
+++ b/components/admin/home/delete-event-popup.vue
@@ -1,36 +1,28 @@
@@ -54,16 +46,16 @@ function resetRefs() {
-
+
-
+
Continue
-
+
Close
-
+
Delete successful! You can close this popup now.
diff --git a/components/admin/home/events-table.vue b/components/admin/home/events-table.vue
index bf485a22..c864ac8e 100644
--- a/components/admin/home/events-table.vue
+++ b/components/admin/home/events-table.vue
@@ -1,6 +1,6 @@