diff options
| author | Wolfboy248 <georgejvindkarlsen@gmail.com> | 2024-10-22 09:34:52 +0200 |
|---|---|---|
| committer | Wolfboy248 <georgejvindkarlsen@gmail.com> | 2024-10-22 09:34:52 +0200 |
| commit | 8de619c5a0899f1eff2d74b003480891f740e2c0 (patch) | |
| tree | 3a0a34bacfadcf47ff70122631d6986dfface52a /frontend/src/pages | |
| parent | frontend: get first non disabled map (diff) | |
| download | lphub-8de619c5a0899f1eff2d74b003480891f740e2c0.tar.gz lphub-8de619c5a0899f1eff2d74b003480891f740e2c0.tar.bz2 lphub-8de619c5a0899f1eff2d74b003480891f740e2c0.zip | |
refactor: hook updated
Diffstat (limited to 'frontend/src/pages')
| -rw-r--r-- | frontend/src/pages/Profile.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index b486ee5..7559c77 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx | |||
| @@ -19,7 +19,7 @@ interface ProfileProps { | |||
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRecord }) => { | 21 | const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRecord }) => { |
| 22 | const { confirm, ConfirmDialogComponent } = useConfirm("Delete record?", "This action cannot be undone"); | 22 | const { confirm, ConfirmDialogComponent } = useConfirm(); |
| 23 | const { message, MessageDialogComponent } = useMessage(); | 23 | const { message, MessageDialogComponent } = useMessage(); |
| 24 | const [navState, setNavState] = React.useState(0); | 24 | const [navState, setNavState] = React.useState(0); |
| 25 | const [pageNumber, setPageNumber] = React.useState(1); | 25 | const [pageNumber, setPageNumber] = React.useState(1); |
| @@ -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(); | 66 | const userConfirmed = await confirm("Delete record?", "This action cannot be undone"); |
| 67 | 67 | ||
| 68 | if (!userConfirmed) { | 68 | if (!userConfirmed) { |
| 69 | return; | 69 | return; |