aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/pages/Profile.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/pages/Profile.tsx')
-rw-r--r--frontend/src/pages/Profile.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx
index 127eb04..2533291 100644
--- a/frontend/src/pages/Profile.tsx
+++ b/frontend/src/pages/Profile.tsx
@@ -61,7 +61,7 @@ const Profile: React.FC<ProfileProps> = ({
61 } 61 }
62 }; 62 };
63 63
64 const _get_game_chapters = async () => { 64 const _get_game_chapters = React.useCallback(async () => {
65 if (game && game !== '0') { 65 if (game && game !== '0') {
66 const gameChapters = await API.get_games_chapters(game); 66 const gameChapters = await API.get_games_chapters(game);
67 setChapterData(gameChapters); 67 setChapterData(gameChapters);
@@ -69,9 +69,9 @@ const Profile: React.FC<ProfileProps> = ({
69 setPageMax(Math.ceil(profile!.records.length / 20)); 69 setPageMax(Math.ceil(profile!.records.length / 20));
70 setPageNumber(1); 70 setPageNumber(1);
71 } 71 }
72 }; 72 }, [game, profile]);
73 73
74 const _get_game_maps = async () => { 74 const _get_game_maps = React.useCallback(async () => {
75 if (chapter === '0') { 75 if (chapter === '0') {
76 const gameMaps = await API.get_game_maps(game); 76 const gameMaps = await API.get_game_maps(game);
77 setMaps(gameMaps); 77 setMaps(gameMaps);
@@ -83,7 +83,7 @@ const Profile: React.FC<ProfileProps> = ({
83 setPageMax(Math.ceil(gameChapters.maps.length / 20)); 83 setPageMax(Math.ceil(gameChapters.maps.length / 20));
84 setPageNumber(1); 84 setPageNumber(1);
85 } 85 }
86 }; 86 }, [chapter, game]);
87 87
88 const _delete_submission = async (map_id: number, record_id: number) => { 88 const _delete_submission = async (map_id: number, record_id: number) => {
89 const userConfirmed = await confirm( 89 const userConfirmed = await confirm(