From 33660ce01bc7b40c81c84bc9e452c649bc3c433b Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 26 Jul 2017 15:11:37 +0900 Subject: [PATCH] probe setrup --- .../@overflow/probe/react/components/ProbeDown.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ts/@overflow/probe/react/components/ProbeDown.tsx b/src/ts/@overflow/probe/react/components/ProbeDown.tsx index e5db489..38a2b5b 100644 --- a/src/ts/@overflow/probe/react/components/ProbeDown.tsx +++ b/src/ts/@overflow/probe/react/components/ProbeDown.tsx @@ -44,8 +44,9 @@ const osNames = [ export class ProbeDown extends React.Component { constructor(props: Props, context: State) { super(props, context); - - this.state = { activeItem: osNames[0].name }; + this.state = { + activeItem: '', + }; } public handleItemClick = (event: React.SyntheticEvent, data: MenuItemProps): void => { @@ -54,6 +55,9 @@ export class ProbeDown extends React.Component { public ShowContent = (): JSX.Element => { let os = this.state.activeItem; + if(os === '') { + return
Instruction page.
; + } switch (os) { case 'Windows': { return ; @@ -74,15 +78,14 @@ export class ProbeDown extends React.Component { } public render(): JSX.Element { - const { activeItem } = this.state.activeItem; return ( - + {osNames.map((item: any, index: number) => { return ( - + {item.name}