From cfac59282da55f4791d6352f15887a15e9ff6ec5 Mon Sep 17 00:00:00 2001 From: Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> Date: Wed, 10 Jul 2024 21:51:25 +0200 Subject: Games page, maplist page (#153) Co-authored-by: Wolfboy248 <105884620+Wolfboy248@users.noreply.github.com> --- frontend/src/components/pages/summary.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'frontend/src/components/pages/summary.js') diff --git a/frontend/src/components/pages/summary.js b/frontend/src/components/pages/summary.js index 0bd26af..9957c5d 100644 --- a/frontend/src/components/pages/summary.js +++ b/frontend/src/components/pages/summary.js @@ -1,5 +1,5 @@ -import React from 'react'; -import { useLocation } from "react-router-dom"; +import React, { useEffect } from 'react'; +import { useLocation, Link } from "react-router-dom"; import ReactMarkdown from 'react-markdown' import "./summary.css"; @@ -317,8 +317,18 @@ if(window.confirm(`Are you sure you want to remove post: ${post.title}?`)){ } - if(data!==null){ + +let current_chapter = data.map.chapter_name +let isCoop = false; +if (data.map.game_name == "Portal 2 - Cooperative") { + isCoop = true +} + +current_chapter = data.map.chapter_name.split(" ") +// current_chapter = current_chapter.split("-") +current_chapter = current_chapter[1] + return ( <> {token!==null?mod===true?:"":""} @@ -329,8 +339,8 @@ return (
- - + +
{data.map.map_name}
-- cgit v1.2.3