From da1fd74f9387149b2b94d62853587a8afdb74ddd Mon Sep 17 00:00:00 2001 From: Wolfboy248 Date: Thu, 21 Aug 2025 10:33:27 +0200 Subject: Reorganised Maplist and Sidebar --- frontend/src/pages/Maplist/Maplist.tsx | 81 +++++++++------------------------- 1 file changed, 20 insertions(+), 61 deletions(-) (limited to 'frontend/src/pages/Maplist/Maplist.tsx') diff --git a/frontend/src/pages/Maplist/Maplist.tsx b/frontend/src/pages/Maplist/Maplist.tsx index 8d9c14a..a5649db 100644 --- a/frontend/src/pages/Maplist/Maplist.tsx +++ b/frontend/src/pages/Maplist/Maplist.tsx @@ -6,6 +6,8 @@ import { API } from "@api/Api.ts"; import { Game } from "@customTypes/Game.ts"; import { GameChapter, GamesChapters } from "@customTypes/Chapters.ts"; +import Map from "./Components/Map"; + const Maplist: React.FC = () => { const [game, setGame] = React.useState(null); const [catNum, setCatNum] = React.useState(0); @@ -87,14 +89,14 @@ const Maplist: React.FC = () => { }, [gameChapters, location.search]); return ( -
+
LPHUB | Maplist -
+
- @@ -105,36 +107,36 @@ const Maplist: React.FC = () => {
) : (
-

+

{game?.name}

-
-

+
+ { game?.category_portals.find( obj => obj.category.id === catNum + 1 )?.portal_count } -

-

+ + portals -

+
-
+
{game?.category_portals.map((cat, index) => (
- \ +
{gameChapters?.chapters.map((chapter, i) => { return (
{ _fetch_chapters(chapter.id.toString()); _handle_dropdown_click(); @@ -189,50 +191,7 @@ const Maplist: React.FC = () => {
{curChapter?.maps.map((map, i) => { return ( -
- - - {map.name} - -
-
- - {map.is_disabled - ? map.category_portals[0].portal_count - : map.category_portals.find( - obj => obj.category.id === catNum + 1 - )?.portal_count} - - - portals - -
-
- -
-
- {[1, 2, 3, 4, 5].map((point) => ( -
- ))} -
-
- -
+ ); })}
-- cgit v1.2.3