From 1963c06226b6e5eee3d84a6a9148a64a4d0bc997 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sun, 1 Dec 2019 15:01:22 +0400 Subject: [PATCH] Relevant page loading on detail page --- components/detailed-roadmap/index.js | 12 ++++++---- components/detailed-roadmap/style.js | 8 +++++++ lib/roadmap.js | 33 ++++++++++++++-------------- pages/[roadmap]/index.js | 2 +- 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/components/detailed-roadmap/index.js b/components/detailed-roadmap/index.js index fb73e780f..62525c2e5 100644 --- a/components/detailed-roadmap/index.js +++ b/components/detailed-roadmap/index.js @@ -11,15 +11,19 @@ import siteConfig from "storage/site"; const DetailedRoadmap = ({ roadmap }) => { const [menuActive, setMenuState] = useState(false); + const { + sidebar = {}, + page: currentPage = {} + } = roadmap; - const roadmapPages = Object.keys(roadmap.sidebar || {}).map(groupTitle => { + const roadmapPages = Object.keys(sidebar || {}).map(groupTitle => { return (

{ groupTitle }