From 8cb0ad1bf5b1cc20bdecf657efdd754a4f28c088 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 8 Jun 2018 12:21:58 +0200 Subject: footer tracks the location somewhat --- app/client/common/header.component.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'app/client/common') diff --git a/app/client/common/header.component.js b/app/client/common/header.component.js index 776fbe4..6e07dd8 100644 --- a/app/client/common/header.component.js +++ b/app/client/common/header.component.js @@ -7,12 +7,21 @@ import * as systemActions from '../system/system.actions' import modules from '../modules' -function Header({ site, app, fps, playing, actions }) { +function Header(props){ + const { site, app, fps, playing, actions, location } = props const tool_list = Object.keys(modules).map((name, i) => { const label = name.replace(/_/, " ") return }) - const Links = modules[app.tool].links + const tool = modules[app.tool] + const links = tool.links().map((link,i) => { + let name = link.url === location.pathname ? {link.name} : link.name + return ( + + {link.url ? {name} : name} + + ) + }) return (
{site.name} cortex @@ -23,7 +32,7 @@ function Header({ site, app, fps, playing, actions }) { system dashboard - + {links} {playing && {fps} fps}
) -- cgit v1.2.3-70-g09d2