From 740c6314fba30600b940bb5316b4e7ac2a222323 Mon Sep 17 00:00:00 2001 From: Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> Date: Thu, 11 Jul 2024 21:23:32 +0200 Subject: feat: improve maplist url (#183) --- frontend/src/App.js | 2 +- frontend/src/components/pages/game.js | 2 +- frontend/src/components/pages/maplist.css | 2 +- frontend/src/components/pages/maplist.js | 2 +- frontend/src/components/pages/summary.js | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/App.js b/frontend/src/App.js index b7bfeb3..5b68ae5 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -40,7 +40,7 @@ export default function App() { }> }> }> - }> + }> }> diff --git a/frontend/src/components/pages/game.js b/frontend/src/components/pages/game.js index 017760b..301e035 100644 --- a/frontend/src/components/pages/game.js +++ b/frontend/src/components/pages/game.js @@ -34,7 +34,7 @@ export default function GameEntry({ gameInfo }) { }) return ( -
+
{gameInfo.name} diff --git a/frontend/src/components/pages/maplist.css b/frontend/src/components/pages/maplist.css index a63c4ec..2f279c3 100644 --- a/frontend/src/components/pages/maplist.css +++ b/frontend/src/components/pages/maplist.css @@ -22,7 +22,7 @@ a { } .maplist-page-header { - margin-top: 20px; + margin-top: 33px; display: grid; margin-bottom: 10px; } diff --git a/frontend/src/components/pages/maplist.js b/frontend/src/components/pages/maplist.js index f4041a2..a7464e9 100644 --- a/frontend/src/components/pages/maplist.js +++ b/frontend/src/components/pages/maplist.js @@ -31,7 +31,7 @@ export default function Maplist(prop) { const url = new URL(window.location.href) const params = new URLSearchParams(url.search) - gameState = parseFloat(params.get("game")) + gameState = parseFloat(location.pathname.split("/")[2]) document.querySelector("#catPortalCount").innerText = data.data[gameState - 1].category_portals[0].portal_count; diff --git a/frontend/src/components/pages/summary.js b/frontend/src/components/pages/summary.js index 9957c5d..d276408 100644 --- a/frontend/src/components/pages/summary.js +++ b/frontend/src/components/pages/summary.js @@ -318,6 +318,7 @@ if(window.confirm(`Are you sure you want to remove post: ${post.title}?`)){ if(data!==null){ + console.log(data) let current_chapter = data.map.chapter_name let isCoop = false; @@ -340,7 +341,7 @@ return (
- +
{data.map.map_name}
-- cgit v1.2.3