diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-22 12:23:35 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-10-22 12:23:35 +0300 |
| commit | 3ee18a8cb3a2893f552275c35b0724daf4b8ab69 (patch) | |
| tree | d9003e0cc2c0a1dcbcda5b6eec247776a8e2f340 /frontend/src/pages/Profile.tsx | |
| parent | backend: importance of || and && (diff) | |
| download | lphub-3ee18a8cb3a2893f552275c35b0724daf4b8ab69.tar.gz lphub-3ee18a8cb3a2893f552275c35b0724daf4b8ab69.tar.bz2 lphub-3ee18a8cb3a2893f552275c35b0724daf4b8ab69.zip | |
frontend: await message
Diffstat (limited to '')
| -rw-r--r-- | frontend/src/pages/Profile.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index 7559c77..05f372e 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,9 @@ 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 | } else { | 75 | } else { |
| 76 | message("Error", "Could not delete record"); | 76 | await message("Delete Record", "Could not delete record."); |
| 77 | } | 77 | } |
| 78 | }; | 78 | }; |
| 79 | 79 | ||