aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/pages')
-rw-r--r--frontend/src/pages/Profile.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx
index 7559c77..5d1c75d 100644
--- a/frontend/src/pages/Profile.tsx
+++ b/frontend/src/pages/Profile.tsx
@@ -63,7 +63,7 @@ const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRec
63 }; 63 };
64 64
65 const _delete_submission = async (map_id: number, record_id: number) => { 65 const _delete_submission = async (map_id: number, record_id: number) => {
66 const userConfirmed = await confirm("Delete record?", "This action cannot be undone"); 66 const userConfirmed = await confirm("Delete Record", "Are you sure you want to delete this record?");
67 67
68 if (!userConfirmed) { 68 if (!userConfirmed) {
69 return; 69 return;
@@ -71,9 +71,10 @@ const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRec
71 71
72 const api_success = await API.delete_map_record(token!, map_id, record_id); 72 const api_success = await API.delete_map_record(token!, map_id, record_id);
73 if (api_success) { 73 if (api_success) {
74 message("Success", "Successfully deleted record"); 74 await message("Delete Record", "Successfully deleted record.");
75 onDeleteRecord();
75 } else { 76 } else {
76 message("Error", "Could not delete record"); 77 await message("Delete Record", "Could not delete record.");
77 } 78 }
78 }; 79 };
79 80