From d1390b074d5439febad9e0d2c378f6f866f1e2eb Mon Sep 17 00:00:00 2001 From: chejennifer <69875368+chejennifer@users.noreply.github.com> Date: Thu, 15 Oct 2020 10:07:37 -0700 Subject: [PATCH] add submenu items for overview page for places without subtopics pages (#606) Co-authored-by: beets --- static/js/place/topic_menu.tsx | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/static/js/place/topic_menu.tsx b/static/js/place/topic_menu.tsx index 9ccd9360b..f88fb34db 100644 --- a/static/js/place/topic_menu.tsx +++ b/static/js/place/topic_menu.tsx @@ -30,11 +30,15 @@ class MenuCategory extends React.Component { const selectCategory = this.props.selectCategory; const category = this.props.category; const topics = this.props.topics; + const hrefString = + category === "Overview" + ? `/place/${dcid}` + : `/place/${dcid}?topic=${category}`; return (
  • {category} @@ -49,10 +53,7 @@ class MenuCategory extends React.Component { {topics.map((topic: string) => { return (
  • - + {topic}
  • @@ -76,19 +77,22 @@ class Menu extends React.Component { const dcid = this.props.dcid; const topic = this.props.topic; const categories = Object.keys(this.props.pageChart); + const showOverviewSubmenu = categories.length === 1; return (