diff options
| -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> |