From aeb26d0e84b14a44ed52e2fd158b01310e295e45 Mon Sep 17 00:00:00 2001
From: Michael Muré <batolettre@gmail.com>
Date: Sun, 21 Mar 2021 21:28:02 +0100
Subject: webui: stay within the SPA when redirecting from the header

---
 webui/src/components/Header/Header.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'webui/src/components/Header/Header.tsx')

diff --git a/webui/src/components/Header/Header.tsx b/webui/src/components/Header/Header.tsx
index 975944d7..3064f6e4 100644
--- a/webui/src/components/Header/Header.tsx
+++ b/webui/src/components/Header/Header.tsx
@@ -8,8 +8,8 @@ import Toolbar from '@material-ui/core/Toolbar';
 import Tooltip from '@material-ui/core/Tooltip/Tooltip';
 import { makeStyles } from '@material-ui/core/styles';
 
-import { LightSwitch } from '../../components/Themer';
 import CurrentIdentity from '../CurrentIdentity/CurrentIdentity';
+import { LightSwitch } from '../Themer';
 
 const useStyles = makeStyles((theme) => ({
   offset: {
@@ -55,7 +55,6 @@ const DisabledTabWithTooltip = (props: TabProps) => {
    * the span element to the Tab component.
    */
   const msg = `This feature doesn't exist yet. Come help us build it.`;
-  console.log(props);
   return (
     <Tooltip title={msg}>
       <span>
@@ -69,7 +68,6 @@ function Header() {
   const classes = useStyles();
   const location = useLocation();
   const [selectedTab, setTab] = React.useState(location.pathname);
-  console.log(location.pathname);
 
   const handleTabClick = (
     event: React.ChangeEvent<{}>,
@@ -101,7 +99,7 @@ function Header() {
         aria-label="nav tabs"
       >
         <DisabledTabWithTooltip label="Code" value="/code" {...a11yProps(1)} />
-        <Tab label="Bugs" value="/" href="/" {...a11yProps(2)} />
+        <Tab label="Bugs" value="/" component={Link} to="/" {...a11yProps(2)} />
         <DisabledTabWithTooltip
           label="Pull Requests"
           value="/pulls"
-- 
cgit 

