Merge branch 'master' of https://git.loafle.net/overflow/overflow_app
This commit is contained in:
commit
45c9b0d5fd
|
@ -44,8 +44,9 @@ const osNames = [
|
|||
export class ProbeDown extends React.Component<any, any> {
|
||||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
|
||||
this.state = { activeItem: osNames[0].name };
|
||||
this.state = {
|
||||
activeItem: '',
|
||||
};
|
||||
}
|
||||
|
||||
public handleItemClick = (event: React.SyntheticEvent<HTMLAnchorElement>, data: MenuItemProps): void => {
|
||||
|
@ -54,6 +55,9 @@ export class ProbeDown extends React.Component<any, any> {
|
|||
|
||||
public ShowContent = (): JSX.Element => {
|
||||
let os = this.state.activeItem;
|
||||
if(os === '') {
|
||||
return <div>Instruction page.</div>;
|
||||
}
|
||||
switch (os) {
|
||||
case 'Windows': {
|
||||
return <Windows />;
|
||||
|
@ -74,15 +78,14 @@ export class ProbeDown extends React.Component<any, any> {
|
|||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
const { activeItem } = this.state.activeItem;
|
||||
return (
|
||||
<Container fluid>
|
||||
<Grid>
|
||||
<Grid.Column width={4}>
|
||||
<Menu fluid vertical icon='labeled'>
|
||||
<Menu fluid vertical icon='labeled' pointing>
|
||||
{osNames.map((item: any, index: number) => {
|
||||
return (
|
||||
<Menu.Item key={index} name={item.name} active={activeItem === item.name} onClick={this.handleItemClick} >
|
||||
<Menu.Item key={index} name={item.name} active={this.state.activeItem === item.name} onClick={this.handleItemClick} >
|
||||
<Icon name={item.icon} />
|
||||
{item.name}
|
||||
</Menu.Item>
|
||||
|
|
Loading…
Reference in New Issue
Block a user