diff options
| author | Wolfboy248 <georgejvindkarlsen@gmail.com> | 2024-12-10 09:42:48 +0100 |
|---|---|---|
| committer | Wolfboy248 <georgejvindkarlsen@gmail.com> | 2024-12-10 09:42:48 +0100 |
| commit | 001290ba71d3720a2c9339ba7dd83e0fcb7bdca5 (patch) | |
| tree | d9a39754cd3ff2ecf43c2a1d295b9fc46c0b226a | |
| parent | frontend: begin port to css modules, sidebar refactor (diff) | |
| download | lphub-001290ba71d3720a2c9339ba7dd83e0fcb7bdca5.tar.gz lphub-001290ba71d3720a2c9339ba7dd83e0fcb7bdca5.tar.bz2 lphub-001290ba71d3720a2c9339ba7dd83e0fcb7bdca5.zip | |
fix/frontent: fix category parameter not working
| -rw-r--r-- | frontend/src/pages/Maplist.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/frontend/src/pages/Maplist.tsx b/frontend/src/pages/Maplist.tsx index 8fc52b0..7b4ce06 100644 --- a/frontend/src/pages/Maplist.tsx +++ b/frontend/src/pages/Maplist.tsx | |||
| @@ -87,7 +87,13 @@ const Maplist: React.FC = () => { | |||
| 87 | } | 87 | } |
| 88 | }, [gameChapters]) | 88 | }, [gameChapters]) |
| 89 | 89 | ||
| 90 | 90 | useEffect(() => { | |
| 91 | const queryParams = new URLSearchParams(location.search); | ||
| 92 | const cat = queryParams.get("cat"); | ||
| 93 | if (cat != null) { | ||
| 94 | setCatNum(parseFloat(cat) - 1); | ||
| 95 | } | ||
| 96 | }, [location]) | ||
| 91 | 97 | ||
| 92 | return ( | 98 | return ( |
| 93 | <main> | 99 | <main> |