errrrr fix

This commit is contained in:
insanity 2017-07-20 14:05:36 +09:00
parent 1a18ae9dbc
commit 23e85d2345
2 changed files with 3 additions and 11 deletions

View File

@ -11,13 +11,11 @@ import Probe from '@overflow/probe/api/model/Probe';
export interface Props { export interface Props {
probe: Probe; probe: Probe;
onBack?(): void;
} }
export interface State { export interface State {
} }
export class ProbeDetails extends React.Component<Props, State> { export class ProbeDetails extends React.Component<Props, State> {
constructor(props: Props, context: State) { constructor(props: Props, context: State) {
@ -56,11 +54,6 @@ export class ProbeBasicInfo extends React.Component<Props, State> {
alert('Discovery'); alert('Discovery');
} }
public handleBack(event: any, data: any): void {
this.props.onBack();
}
public showStartStopBtn(): JSX.Element { public showStartStopBtn(): JSX.Element {
let temp: any = null; let temp: any = null;
temp = this.props.probe; temp = this.props.probe;
@ -116,7 +109,6 @@ export class ProbeBasicInfo extends React.Component<Props, State> {
</Table.Body> </Table.Body>
</Table> </Table>
<Button content='List' icon='list' labelPosition='left' onClick={this.handleBack.bind(this)} />
<Button content='Discovery' icon='search' labelPosition='left' floated={'right'} positive onClick={this.handleDiscovery} /> <Button content='Discovery' icon='search' labelPosition='left' floated={'right'} positive onClick={this.handleDiscovery} />
{this.showStartStopBtn()} {this.showStartStopBtn()}

View File

@ -9,7 +9,7 @@ export interface Props {
} }
export interface State { export interface State {
selected: object; selected: Probe;
isDetail: boolean; isDetail: boolean;
list: Probe[]; list: Probe[];
} }
@ -88,7 +88,7 @@ export class Probes extends React.Component<Props, State> {
return false; return false;
} }
public handleSelect(selectedProbe: object): void { public handleSelect(selectedProbe: any): void {
this.setState({ this.setState({
selected: selectedProbe, selected: selectedProbe,
isDetail: true, isDetail: true,
@ -121,7 +121,7 @@ export class Probes extends React.Component<Props, State> {
public render(): JSX.Element { public render(): JSX.Element {
if (this.state.isDetail) { if (this.state.isDetail) {
return <ProbeDetails probe={this.state.selected} onBack={() => this.setState({ isDetail: false })} />; return <ProbeDetails probe={this.state.selected} />;
} }
let probeList = let probeList =
<Container fluid> <Container fluid>