diff options
| author | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 11:15:49 -0600 |
|---|---|---|
| committer | FifthWit <fifthwitbusiness@gmail.com> | 2025-01-30 11:15:49 -0600 |
| commit | 8817a64cd75d91828c6e487c70ff1b9acead575f (patch) | |
| tree | f5f3383ae2f1e64b0f0258bd7e3866a75824ace4 /frontend/src/pages | |
| parent | fixed useEffect deps (diff) | |
| download | lphub-8817a64cd75d91828c6e487c70ff1b9acead575f.tar.gz lphub-8817a64cd75d91828c6e487c70ff1b9acead575f.tar.bz2 lphub-8817a64cd75d91828c6e487c70ff1b9acead575f.zip | |
fixed missing useEffect deps
Diffstat (limited to 'frontend/src/pages')
| -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 7e3d603..127eb04 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx | |||
| @@ -111,19 +111,19 @@ const Profile: React.FC<ProfileProps> = ({ | |||
| 111 | if (!profile) { | 111 | if (!profile) { |
| 112 | navigate('/'); | 112 | navigate('/'); |
| 113 | } | 113 | } |
| 114 | }, [profile]); | 114 | }, [profile, navigate]); |
| 115 | 115 | ||
| 116 | React.useEffect(() => { | 116 | React.useEffect(() => { |
| 117 | if (profile) { | 117 | if (profile) { |
| 118 | _get_game_chapters(); | 118 | _get_game_chapters(); |
| 119 | } | 119 | } |
| 120 | }, [profile, game]); | 120 | }, [profile, game, _get_game_chapters]); |
| 121 | 121 | ||
| 122 | React.useEffect(() => { | 122 | React.useEffect(() => { |
| 123 | if (profile && game !== '0') { | 123 | if (profile && game !== '0') { |
| 124 | _get_game_maps(); | 124 | _get_game_maps(); |
| 125 | } | 125 | } |
| 126 | }, [profile, game, chapter, chapterData]); | 126 | }, [profile, game, chapter, chapterData, _get_game_maps]); |
| 127 | 127 | ||
| 128 | if (!profile) { | 128 | if (!profile) { |
| 129 | return <></>; | 129 | return <></>; |