diff options
| author | Wolfboy248 <georgejvindkarlsen@gmail.com> | 2024-10-28 11:43:38 +0100 |
|---|---|---|
| committer | Wolfboy248 <georgejvindkarlsen@gmail.com> | 2024-10-28 11:43:38 +0100 |
| commit | 6fdc20a4db98531545badedf983a81a05f0ea450 (patch) | |
| tree | 69d314fd8fad33cc12c676617b5bc1c6ff066cce /frontend/src/pages/Profile.tsx | |
| parent | refactor: uploadrundialog (diff) | |
| parent | backend: fix user completion count (diff) | |
| download | lphub-6fdc20a4db98531545badedf983a81a05f0ea450.tar.gz lphub-6fdc20a4db98531545badedf983a81a05f0ea450.tar.bz2 lphub-6fdc20a4db98531545badedf983a81a05f0ea450.zip | |
Merge branch 'typescript' of https://github.com/pektezol/LeastPortalsHub into typescript
Diffstat (limited to 'frontend/src/pages/Profile.tsx')
| -rw-r--r-- | frontend/src/pages/Profile.tsx | 7 |
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 | ||