From 4926f749866a707879158934fda54b169b39c4ec Mon Sep 17 00:00:00 2001 From: insanity Date: Mon, 24 Jul 2017 18:18:33 +0900 Subject: [PATCH] bugfix --- src/ts/@overflow/app/views/layout/AppLayout.tsx | 4 ++-- src/ts/@overflow/app/views/layout/ProbeDetailLayout.tsx | 6 ++++-- src/ts/@overflow/app/views/layout/TitleBar.tsx | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ts/@overflow/app/views/layout/AppLayout.tsx b/src/ts/@overflow/app/views/layout/AppLayout.tsx index 1114aa2..60bb9dc 100644 --- a/src/ts/@overflow/app/views/layout/AppLayout.tsx +++ b/src/ts/@overflow/app/views/layout/AppLayout.tsx @@ -3,7 +3,7 @@ import { Redirect, RouteComponentProps, RouteProps, Route, Switch } from 'react- import { Container, Menu, Sidebar, Segment, Icon, Breadcrumb, Grid, Dropdown } from 'semantic-ui-react'; import { Header } from './Header'; import { Footer } from './Footer'; -import { TitleBar } from './TitleBar'; +import TitleBarContainer from './TitleBarContainer'; import LeftMenu from './LeftMenu'; import Home from '../Home'; @@ -38,7 +38,7 @@ export class AppLayout extends React.Component {
- + diff --git a/src/ts/@overflow/app/views/layout/ProbeDetailLayout.tsx b/src/ts/@overflow/app/views/layout/ProbeDetailLayout.tsx index 2326eb3..8b199ba 100644 --- a/src/ts/@overflow/app/views/layout/ProbeDetailLayout.tsx +++ b/src/ts/@overflow/app/views/layout/ProbeDetailLayout.tsx @@ -13,6 +13,7 @@ import ProbeHistory from '../../views/monitoring/probe/History'; export interface Props extends RouteComponentProps { } export interface State { + currUrl: string; } export class ProbeDetailLayout extends React.Component { @@ -20,6 +21,7 @@ export class ProbeDetailLayout extends React.Component { constructor(props: Props, context: State) { super(props, context); this.state = { + currUrl: this.props.location.pathname, }; } @@ -28,11 +30,11 @@ export class ProbeDetailLayout extends React.Component { const sub = [ { 'name': 'Info', - 'path': `${this.props.location.pathname}`, + 'path': this.state.currUrl, }, { 'name': 'History', - 'path': `${this.props.location.pathname}/history`, + 'path': this.state.currUrl + '/history', }, ]; return ( diff --git a/src/ts/@overflow/app/views/layout/TitleBar.tsx b/src/ts/@overflow/app/views/layout/TitleBar.tsx index 8db5ac5..f066fe5 100644 --- a/src/ts/@overflow/app/views/layout/TitleBar.tsx +++ b/src/ts/@overflow/app/views/layout/TitleBar.tsx @@ -24,7 +24,6 @@ export class TitleBar extends React.Component { } public handleMenu(menu:any): any { - console.log(menu.path); this.props.onRedirect(menu.path); }